Explorar o código

fix: always use sha1 of hostname as upstream name

Nicolas Duchon %!s(int64=3) %!d(string=hai) anos
pai
achega
89d37882b6
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      nginx.tmpl

+ 1 - 2
nginx.tmpl

@@ -153,8 +153,7 @@ server {
 {{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }}
 
 {{ $host := trim $host }}
-{{ $is_regexp := hasPrefix "~" $host }}
-{{ $upstream_name := (print (when $is_regexp (sha1 $host) $host) "-upstream") }}
+{{ $upstream_name := sha1 $host }}
 
 # {{ $host }}
 upstream {{ $upstream_name }} {