Add override for proxy_intercept_errors when using Custom HTTP Errors (#9497)
* added proxy-intercept-errors config option * fixed error when comparing locations * fixed missing location config from annotation added e2e test * reversed logic for proxy-intercept-errors to disable-proxy-intercept-errors * reversed logic to disable-proxy-intercept-errors * reversed logic * default has to be false * put comment in same line as return * run gofmt * fixing wrong Boilerplate header * updated code to new IngressAnnotation interface * fixes to satisfy PR comments * synced with upstream; fixed typo * gofumpt disableproxyintercepterrors.go * gofumpt
This commit is contained in:
parent
e0446d7554
commit
ad406b64d8
12 changed files with 395 additions and 108 deletions
|
|
@ -487,7 +487,7 @@ http {
|
|||
ssl_certificate {{ $cfg.DefaultSSLCertificate.PemFileName }};
|
||||
ssl_certificate_key {{ $cfg.DefaultSSLCertificate.PemFileName }};
|
||||
|
||||
{{ if gt (len $cfg.CustomHTTPErrors) 0 }}
|
||||
{{ if and $cfg.CustomHTTPErrors (not $cfg.DisableProxyInterceptErrors) }}
|
||||
proxy_intercept_errors on;
|
||||
{{ end }}
|
||||
|
||||
|
|
@ -1473,7 +1473,7 @@ stream {
|
|||
{{ end }}
|
||||
|
||||
{{/* if a location-specific error override is set, add the proxy_intercept here */}}
|
||||
{{ if $location.CustomHTTPErrors }}
|
||||
{{ if and $location.CustomHTTPErrors (not $location.DisableProxyInterceptErrors) }}
|
||||
# Custom error pages per ingress
|
||||
proxy_intercept_errors on;
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue