Skip to content

Commit

Permalink
Merge pull request #178 from aledbf/proxy-name
Browse files Browse the repository at this point in the history
Add initialization of proxy variable
  • Loading branch information
aledbf authored Jan 26, 2017
2 parents 53f1336 + 2baa1de commit 87d4145
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -323,7 +325,6 @@ http {
proxy_set_header Accept-Encoding "";
{{ end }}

set $proxy_upstream_name "{{ $location.Backend }}";
{{ buildProxyPass $backends $location }}
{{ else }}
#{{ $location.Denied }}
Expand Down

0 comments on commit 87d4145

Please sign in to comment.