Browse Source

fix: always use sha1 of hostname as upstream name

Nicolas Duchon 3 năm trước cách đây
mục cha
commit
89d37882b6
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  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 }} {