mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-09 13:02:33 +02:00
debug: add option to disable auth
This commit is contained in:
parent
c66b17583f
commit
dd6af9b8e0
2 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
|
@ -20,8 +20,6 @@ var (
|
|||
IsTrace = GetEnvBool("TRACE", false) && IsDebug
|
||||
IsProduction = !IsTest && !IsDebug
|
||||
|
||||
DebugMemLogger = GetEnvBool("DEBUG_MEM_LOGGER", false)
|
||||
|
||||
ProxyHTTPAddr,
|
||||
ProxyHTTPHost,
|
||||
ProxyHTTPPort,
|
||||
|
@ -44,6 +42,8 @@ var (
|
|||
APIUser = GetEnvString("API_USER", "admin")
|
||||
APIPassword = GetEnvString("API_PASSWORD", "password")
|
||||
|
||||
DebugDisableAuth = GetEnvBool("DEBUG_DISABLE_AUTH", false)
|
||||
|
||||
// OIDC Configuration.
|
||||
OIDCIssuerURL = GetEnvString("OIDC_ISSUER_URL", "")
|
||||
OIDCLogoutURL = GetEnvString("OIDC_LOGOUT_URL", "")
|
||||
|
|
Loading…
Add table
Reference in a new issue