Add initialization of proxy variable

This commit is contained in:
Manuel de Brito Fontes 2017-01-26 10:33:29 -03:00
parent aa7995266d
commit de7c08e374

View file

@ -244,6 +244,8 @@ http {
{{ end }}
location {{ $path }} {
set $proxy_upstream_name "{{ $location.Backend }}";
{{ if isLocationAllowed $location }}
{{ if gt (len $location.Whitelist.CIDR) 0 }}
{{ range $ip := $location.Whitelist.CIDR }}
@ -319,7 +321,6 @@ http {
proxy_set_header Accept-Encoding "";
{{ end }}
set $proxy_upstream_name "{{ $location.Backend }}";
{{ buildProxyPass $backends $location }}
{{ else }}
#{{ $location.Denied }}