diff --git a/internal/ingress/annotations/authreq/main.go b/internal/ingress/annotations/authreq/main.go index c66b0ed47..8c253563b 100644 --- a/internal/ingress/annotations/authreq/main.go +++ b/internal/ingress/annotations/authreq/main.go @@ -170,6 +170,7 @@ type Config struct { KeepaliveTimeout int `json:"keepaliveTimeout"` ProxySetHeaders map[string]string `json:"proxySetHeaders,omitempty"` AlwaysSetCookie bool `json:"alwaysSetCookie,omitempty"` + DefaultEnable bool `json:"defaultEnable,omitempty"` /*# toredash */ } // DefaultCacheDuration is the fallback value if no cache duration is provided diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index bad82b8b0..8723265bc 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -762,7 +762,7 @@ func NewDefault() Configuration { defNginxStatusIpv4Whitelist = append(defNginxStatusIpv4Whitelist, "127.0.0.1") defNginxStatusIpv6Whitelist = append(defNginxStatusIpv6Whitelist, "::1") defProxyDeadlineDuration := time.Duration(5) * time.Second - defGlobalExternalAuth := GlobalExternalAuth{"", "", "", "", "", append(defResponseHeaders, ""), "", "", "", []string{}, map[string]string{}, false} + defGlobalExternalAuth := GlobalExternalAuth{"", "", "", "", "", append(defResponseHeaders, ""), "", "", "", []string{}, map[string]string{}, false, true} cfg := Configuration{ AllowSnippetAnnotations: false, @@ -976,4 +976,5 @@ type GlobalExternalAuth struct { AuthCacheDuration []string `json:"authCacheDuration"` ProxySetHeaders map[string]string `json:"proxySetHeaders,omitempty"` AlwaysSetCookie bool `json:"alwaysSetCookie,omitempty"` + DefaultEnable bool `json:"defaultEnable,omitempty"` }