regexp: use sha1 for upstream only if regexp is used
avoid confusions such as in #677
This commit is contained in:
parent
2c5d4ee3a9
commit
3f6381d0fa
1 changed files with 2 additions and 1 deletions
|
@ -92,7 +92,8 @@ server {
|
|||
{{ end }}
|
||||
|
||||
{{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }}
|
||||
{{ $upstream_name := sha1 $host }}
|
||||
{{ $is_regexp := hasPrefix "~" $host }}
|
||||
{{ $upstream_name := when $is_regexp (sha1 $host) $host }}
|
||||
# {{ $host }}
|
||||
upstream {{ $upstream_name }} {
|
||||
{{ range $container := $containers }}
|
||||
|
|
Loading…
Reference in a new issue