fix: default values if port and dest are missing

This commit is contained in:
Nicolas Duchon
2024-05-05 16:15:27 +02:00
parent fc98f4c953
commit 62d9c08474
+3
View File
@@ -506,6 +506,9 @@ proxy_set_header Proxy "";
{{- end }}
{{- range $path, $vpath := $vhost }}
{{- if (empty $vpath) }}
{{- $vpath = dict "dest" "" "port" "default" }}
{{- end }}
{{- $dest := coalesce $vpath.dest "" }}
{{- $port := when (hasKey $vpath "port") (toString $vpath.port) "default" }}
{{- $path_data := when (hasKey $paths $path) (get $paths $path) (dict) }}