disabled auth by default (when no JWT secret is specified)

This commit is contained in:
yusing
2024-11-04 00:32:19 +08:00
parent c6a9a816f6
commit b63ebfcb3b
3 changed files with 11 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ func LogoutHandler(w http.ResponseWriter, r *http.Request) {
}
func RequireAuth(next http.HandlerFunc) http.HandlerFunc {
if common.IsDebugSkipAuth {
if common.IsDebugSkipAuth || common.APIJWTSecret == nil {
return next
}