From 2baa1def46e42d81062b8d7faff69f8becf6f3f0 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Thu, 26 Jan 2017 10:33:29 -0300 Subject: [PATCH] Add initialization of proxy variable --- controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl b/controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl index 5f10d030b..3fd2da9df 100644 --- a/controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl +++ b/controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl @@ -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 }}