瀏覽代碼

Suffix upstream names to prevent confusion with FQDNs

Chris Heald 6 年之前
父節點
當前提交
85327a871e
共有 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 }} {