浏览代码

prevent double slash

Niek 1 年之前
父节点
当前提交
d4438b5a09
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      nginx.tmpl

+ 1 - 1
nginx.tmpl

@@ -276,7 +276,7 @@
         {{- end }}
 
         {{- if (exists (printf "/etc/nginx/htpasswd/%s_%s" .Host (sha1 .Path) )) }}
-        auth_basic "Restricted {{ .Host }}/{{ .Path }}";
+        auth_basic "Restricted {{ .Host }}{{ .Path }}";
         auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s_%s" .Host (sha1 .Path)) }};
         {{- else if (exists (printf "/etc/nginx/htpasswd/%s" .Host)) }}
         auth_basic "Restricted {{ .Host }}";