1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-08-23 16:01:57 +00:00

feat: DEFAULT_ROOT=none disables the default location / block

This commit is contained in:
Richard Hansen
2023-01-18 18:27:35 -05:00
parent d3ded293ac
commit f8ae0a4b00
4 changed files with 35 additions and 5 deletions

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 }};
}