Type mismatch dollar vs percent

This commit is contained in:
Albert Murillo 2014-12-16 23:54:07 +01:00
parent d931fb7875
commit b5be500845

View file

@ -68,9 +68,6 @@ upstream {{ $host }} {
{{ end }}
}
{{/* Get the htpasswd file defined by containers w/ the same vhost */}}
{{ $htpasswdFile := (first (groupByKeys $containers "Env.HTPASSWD_FILE”)) }}
{{/* Get the first cert name defined by containers w/ the same vhost */}}
{{ $certName := (first (groupByKeys $containers "Env.CERT_NAME")) }}
@ -109,9 +106,9 @@ server {
location / {
proxy_pass http://{{ $host }};
{{ if (exists (printf "/etc/nginx/htpasswd/$s" $host)) }}
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
auth_basic "Restricted {{ $host }}";
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/$s" $host }};
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }};
{{ end }}
}
}
@ -122,9 +119,9 @@ server {
location / {
proxy_pass http://{{ $host }};
{{ if (exists (printf "/etc/nginx/htpasswd/$s" $host)) }}
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
auth_basic "Restricted {{ $host }}";
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/$s" $host }};
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }};
{{ end }}
}
}