Merge pull request #178 from aledbf/proxy-name

Add initialization of proxy variable
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-01-26 16:50:20 -03:00 committed by GitHub
commit 87d4145c76

View file

@ -248,6 +248,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 }}
@ -323,7 +325,6 @@ http {
proxy_set_header Accept-Encoding "";
{{ end }}
set $proxy_upstream_name "{{ $location.Backend }}";
{{ buildProxyPass $backends $location }}
{{ else }}
#{{ $location.Denied }}