1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 01:38:15 +00:00

fix: default values if port and dest are missing

This commit is contained in:
Nicolas Duchon 2024-05-02 13:00:55 +02:00
parent fc98f4c953
commit 62d9c08474
No known key found for this signature in database
GPG Key ID: EA3151C66A4D79E7

View File

@ -506,6 +506,9 @@ proxy_set_header Proxy "";
{{- end }} {{- end }}
{{- range $path, $vpath := $vhost }} {{- range $path, $vpath := $vhost }}
{{- if (empty $vpath) }}
{{- $vpath = dict "dest" "" "port" "default" }}
{{- end }}
{{- $dest := coalesce $vpath.dest "" }} {{- $dest := coalesce $vpath.dest "" }}
{{- $port := when (hasKey $vpath "port") (toString $vpath.port) "default" }} {{- $port := when (hasKey $vpath "port") (toString $vpath.port) "default" }}
{{- $path_data := when (hasKey $paths $path) (get $paths $path) (dict) }} {{- $path_data := when (hasKey $paths $path) (get $paths $path) (dict) }}