mirror of
https://github.com/wahyd4/ingress-nginx.git
synced 2026-08-09 05:16:27 +10:00
fix: remove unnecessary if statement when redirect annotation is defined
This commit is contained in:
@@ -1136,12 +1136,6 @@ stream {
|
||||
|
||||
{{ buildInfluxDB $location.InfluxDB }}
|
||||
|
||||
{{ if not (empty $location.Redirect.URL) }}
|
||||
if ($uri ~* {{ stripLocationModifer $path }}) {
|
||||
return {{ $location.Redirect.Code }} {{ $location.Redirect.URL }};
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
{{ if isValidByteSize $location.Proxy.BodySize true }}
|
||||
client_max_body_size {{ $location.Proxy.BodySize }};
|
||||
{{ end }}
|
||||
@@ -1267,6 +1261,10 @@ stream {
|
||||
fastcgi_param {{ $k }} {{ $v | quote }};
|
||||
{{ end }}
|
||||
|
||||
{{ if not (empty $location.Redirect.URL) }}
|
||||
return {{ $location.Redirect.Code }} {{ $location.Redirect.URL }};
|
||||
{{ end }}
|
||||
|
||||
{{ buildProxyPass $server.Hostname $all.Backends $location }}
|
||||
{{ if (or (eq $location.Proxy.ProxyRedirectFrom "default") (eq $location.Proxy.ProxyRedirectFrom "off")) }}
|
||||
proxy_redirect {{ $location.Proxy.ProxyRedirectFrom }};
|
||||
|
||||
Reference in New Issue
Block a user