Add initialization of proxy variable
This commit is contained in:
parent
92ddc6c670
commit
2baa1def46
1 changed files with 2 additions and 1 deletions
|
@ -244,6 +244,8 @@ http {
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
location {{ $path }} {
|
location {{ $path }} {
|
||||||
|
set $proxy_upstream_name "{{ $location.Backend }}";
|
||||||
|
|
||||||
{{ if isLocationAllowed $location }}
|
{{ if isLocationAllowed $location }}
|
||||||
{{ if gt (len $location.Whitelist.CIDR) 0 }}
|
{{ if gt (len $location.Whitelist.CIDR) 0 }}
|
||||||
{{ range $ip := $location.Whitelist.CIDR }}
|
{{ range $ip := $location.Whitelist.CIDR }}
|
||||||
|
@ -319,7 +321,6 @@ http {
|
||||||
proxy_set_header Accept-Encoding "";
|
proxy_set_header Accept-Encoding "";
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
set $proxy_upstream_name "{{ $location.Backend }}";
|
|
||||||
{{ buildProxyPass $backends $location }}
|
{{ buildProxyPass $backends $location }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
#{{ $location.Denied }}
|
#{{ $location.Denied }}
|
||||||
|
|
Loading…
Reference in a new issue