Config/Annotations: Add relative-redirects. (#12161)
This commit is contained in:
parent
0207d1878a
commit
698960e9b7
8 changed files with 182 additions and 0 deletions
|
|
@ -459,6 +459,10 @@ http {
|
|||
proxy_intercept_errors on;
|
||||
{{ end }}
|
||||
|
||||
{{ if $cfg.RelativeRedirects }}
|
||||
absolute_redirect off;
|
||||
{{ end }}
|
||||
|
||||
{{ range $errCode := $cfg.CustomHTTPErrors }}
|
||||
error_page {{ $errCode }} = @custom_upstream-default-backend_{{ $errCode }};{{ end }}
|
||||
|
||||
|
|
@ -1343,6 +1347,10 @@ stream {
|
|||
satisfy {{ $location.Satisfy }};
|
||||
{{ end }}
|
||||
|
||||
{{ if $location.Redirect.Relative }}
|
||||
absolute_redirect off;
|
||||
{{ end }}
|
||||
|
||||
{{/* if a location-specific error override is set, add the proxy_intercept here */}}
|
||||
{{ if and $location.CustomHTTPErrors (not $location.DisableProxyInterceptErrors) }}
|
||||
# Custom error pages per ingress
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue