mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-26 19:11:08 +01:00
api: add DEBUG_DISABLE_AUTH for debugging
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -44,6 +44,7 @@ var (
|
||||
APIJWTTokenTTL = GetDurationEnv("API_JWT_TOKEN_TTL", time.Hour)
|
||||
APIUser = GetEnvString("API_USER", "admin")
|
||||
APIPassword = GetEnvString("API_PASSWORD", "password")
|
||||
DebugDisableAuth = GetEnvBool("DEBUG_DISABLE_AUTH", false)
|
||||
|
||||
// OIDC Configuration.
|
||||
OIDCIssuerURL = GetEnvString("OIDC_ISSUER_URL", "")
|
||||
|
||||
Reference in New Issue
Block a user