fix: 对齐 authz 认证链路
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user