This commit is contained in:
WJQSERVER 2024-10-06 04:32:55 +08:00
parent 61e741c9b3
commit 5ac08bba56
6 changed files with 36 additions and 12 deletions

View file

@ -12,7 +12,6 @@ var logw = logger.Logw
func AuthHandler(c *gin.Context, cfg *config.Config) bool {
// 如果身份验证未启用,直接返回 true
if !cfg.Auth.Enabled {
logw("auth PASSED")
return true
}
@ -31,5 +30,6 @@ func AuthHandler(c *gin.Context, cfg *config.Config) bool {
logw("auth FAILED: invalid auth_token: %s", authToken)
}
logw("auth SUCCESS: %t", isValid)
return isValid
}