移除Host头验证中间件及相关逻辑,简化OAuth相关API的请求处理,优化代码结构和可读性。

This commit is contained in:
2025-09-22 20:29:46 +08:00
parent c1b5c76e5c
commit 75969253d0
10 changed files with 22 additions and 339 deletions
-12
View File
@@ -736,18 +736,6 @@ export async function simpleRootLogin(
});
}
// 密码强度验证
// const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$/;
// if (!passwordRegex.test(password.trim())) {
// return new Response(JSON.stringify({
// success: false,
// error: "密码必须至少8位,包含大小写字母和数字"
// }), {
// status: 400,
// headers: { "Content-Type": "application/json" }
// });
// }
// 调用登录接口
const loginResponse = await fetch(`${API_BASE_URL}/password_login`, {
method: 'POST',