From 63ed19947a1c34b0d643f1706a78d4b33017b4c7 Mon Sep 17 00:00:00 2001 From: "Tore S. Loenoey" Date: Wed, 22 Nov 2023 13:43:40 +0100 Subject: [PATCH] fix: stuff --- internal/ingress/annotations/authreq/main.go | 1 + internal/ingress/controller/config/config.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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"` }