2
0
Эх сурвалжийг харах

fix: default values if port and dest are missing

Nicolas Duchon 1 жил өмнө
parent
commit
62d9c08474
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      nginx.tmpl

+ 3 - 0
nginx.tmpl

@@ -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) }}