From 89d37882b63ac68fe2b0a39d1e59020800d501c4 Mon Sep 17 00:00:00 2001 From: Nicolas Duchon Date: Wed, 4 Aug 2021 22:28:00 +0200 Subject: [PATCH] fix: always use sha1 of hostname as upstream name --- nginx.tmpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nginx.tmpl b/nginx.tmpl index 7c36e70..6df80f6 100644 --- a/nginx.tmpl +++ b/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 }} {