Browse Source

Suffix upstream names to prevent confusion with FQDNs

Chris Heald 6 years ago
parent
commit
85327a871e
1 changed files with 1 additions and 1 deletions
  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 }} {