فهرست منبع

trim whitespace from host and port

based on latest docker-gen
Marius Gundersen 9 سال پیش
والد
کامیت
1e0b930174
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      nginx.tmpl

+ 2 - 2
nginx.tmpl

@@ -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) }};