feat: DEFAULT_ROOT=none disables the default location / block

This commit is contained in:
Richard Hansen committed 2023-01-23 20:47:00 -05:00
1 parent d3ded293ac
commit f8ae0a4b00
4 files changed
+35 -5

No files matched your search

+1 -1
View File
@@ -448,7 +448,7 @@ server {
{{- end }}
{{- template "location" (dict "Path" $path "Proto" $proto "Upstream" $upstream "Host" $host "VhostRoot" $vhost_root "Dest" $dest "NetworkTag" $network_tag) }}
{{- end }}
{{- if (not (contains $paths "/")) }}
{{- if and (not (contains $paths "/")) (ne $globals.default_root_response "none")}}
location / {
return {{ $globals.default_root_response }};
}