fix: default values if port and dest are missing
This commit is contained in:
parent
fc98f4c953
commit
62d9c08474
1 changed files with 3 additions and 0 deletions
|
@ -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) }}
|
||||||
|
|
Loading…
Reference in a new issue