浏览代码

Merge pull request #1163 from cheald/unique-upstreams

Suffix upstream names to prevent confusion with FQDNs
Nicolas Duchon 4 年之前
父节点
当前提交
5c1a1c8a6d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      nginx.tmpl

+ 1 - 1
nginx.tmpl

@@ -172,7 +172,7 @@ server {
 
 {{ $host := trim $host }}
 {{ $is_regexp := hasPrefix "~" $host }}
-{{ $upstream_name := when $is_regexp (sha1 $host) $host }}
+{{ $upstream_name := (print (when $is_regexp (sha1 $host) $host) "-upstream") }}
 
 # {{ $host }}
 upstream {{ $upstream_name }} {