1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2024-12-25 12:06:31 +00:00

trim whitespace from host and port

based on latest docker-gen
This commit is contained in:
Marius Gundersen 2015-10-13 21:48:59 +02:00
parent f819a4e2e7
commit 1e0b930174

View File

@ -144,7 +144,7 @@ server {
{{ end }}
location / {
proxy_pass {{ $proto }}://{{ $host }};
proxy_pass {{ trim $proto }}://{{ trim $host }};
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
auth_basic "Restricted {{ $host }}";
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }};
@ -170,7 +170,7 @@ server {
{{ end }}
location / {
proxy_pass {{ $proto }}://{{ $host }};
proxy_pass {{ trim $proto }}://{{ trim $host }};
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
auth_basic "Restricted {{ $host }}";
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }};