fix: Ignore VIRTUAL_HOST set to the empty string

Fixes #2144
This commit is contained in:
Richard Hansen committed 2023-01-23 20:48:16 -05:00
1 parent f8ae0a4b00
commit 8346b68a28
3 files changed
+51

No files matched your search

+4
View File
@@ -271,6 +271,10 @@ server {
{{- range $host, $containers := groupByMulti $globals.containers "Env.VIRTUAL_HOST" "," }}
{{- $host := trim $host }}
{{- if not $host }}
{{- /* Ignore containers with VIRTUAL_HOST set to the empty string. */}}
{{- continue }}
{{- end }}
{{- $is_regexp := hasPrefix "~" $host }}
{{- $upstream_name := when (or $is_regexp $globals.sha1_upstream_name) (sha1 $host) $host }}