fix: 对齐 authz 认证链路

This commit is contained in:
zetaloop
2026-04-05 12:06:39 +08:00
parent dc87df28a4
commit 384471edca
9 changed files with 864 additions and 58 deletions
+10 -2
View File
@@ -114,10 +114,18 @@ func deny(code codepb.Code, httpCode typev3.StatusCode, message string) *authv3.
}
func isPublicPath(path string) bool {
if path == "/healthz" || path == "/api/users/login" || path == "/api/users/register" {
switch path {
case "/healthz",
"/api/v1/auth/login",
"/api/v1/auth/register",
"/api/v1/auth/forgot-password",
"/api/v1/auth/reset-password",
"/api/v1/auth/forgot-password/send",
"/api/v1/email/verification-code/send":
return true
default:
return false
}
return false
}
func getHeader(headers map[string]string, key string) string {