Forráskód Böngészése

Merge pull request #1163 from cheald/unique-upstreams

Suffix upstream names to prevent confusion with FQDNs
Nicolas Duchon 4 éve
szülő
commit
5c1a1c8a6d
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      nginx.tmpl

+ 1 - 1
nginx.tmpl

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