api: add DEBUG_DISABLE_AUTH for debugging

This commit is contained in:
yusing
2025-03-28 07:17:59 +08:00
parent 9cb7cc84ee
commit 78a3c8a8e4
2 changed files with 2 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ func GetDefaultAuth() Provider {
}
func IsEnabled() bool {
return common.APIJWTSecret != nil || IsOIDCEnabled()
return !common.DebugDisableAuth && (common.APIJWTSecret != nil || IsOIDCEnabled())
}
func IsOIDCEnabled() bool {