Resolves issue with proxy-redirect nginx configuration
Resolves an issue where the proxy-redirect annotations were not generating the correct configuration possibly because of user error. This is done by only setting the proxy_redirect if both proxy-redirect-from and proxy-redirect-to have valid values. Also adds the e2e tests. Fixes #2074
This commit is contained in:
parent
d577fe2c15
commit
e224259e38
6 changed files with 179 additions and 7 deletions
|
|
@ -1087,7 +1087,7 @@ stream {
|
|||
{{ buildProxyPass $server.Hostname $all.Backends $location $all.DynamicConfigurationEnabled }}
|
||||
{{ if (or (eq $location.Proxy.ProxyRedirectFrom "default") (eq $location.Proxy.ProxyRedirectFrom "off")) }}
|
||||
proxy_redirect {{ $location.Proxy.ProxyRedirectFrom }};
|
||||
{{ else }}
|
||||
{{ else if not (eq $location.Proxy.ProxyRedirectTo "off") }}
|
||||
proxy_redirect {{ $location.Proxy.ProxyRedirectFrom }} {{ $location.Proxy.ProxyRedirectTo }};
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue