diff --git a/nginx.tmpl b/nginx.tmpl index a5be0b0..2b73158 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -526,10 +526,7 @@ proxy_set_header Proxy ""; {{- $vhost_data := when (hasKey $globals.vhosts $hostname) (get $globals.vhosts $hostname) (dict) }} {{- $paths := coalesce $vhost_data.paths (dict) }} - {{- $tmp_paths := groupBy $containers "Env.VIRTUAL_PATH" }} - {{- if not (gt (len $tmp_paths) 0) }} - {{- $tmp_paths = dict "/" $containers }} - {{- end }} + {{- $tmp_paths := groupByWithDefault $containers "Env.VIRTUAL_PATH" "/" }} {{- range $path, $containers := $tmp_paths }} {{- $dest := or (first (groupByKeys $containers "Env.VIRTUAL_DEST")) "" }}