Skip to content

Commit 4b2ce4c

Browse files
committed
Coalesce DEBUG flag with the proxy's one
1 parent 7d9fc54 commit 4b2ce4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/nginx.tmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
{{ $http_proxy_protocol := when $http_proxy_protocol_enabled "proxy_protocol" "" }}
1010
{{ $https_proxy_protocol := when $https_proxy_protocol_enabled "proxy_protocol" "" }}
1111
{{ $all_real_ip_from := coalesce $.Env.REAL_IP_FROM "" }}
12+
{{ $debug_all := $.Env.DEBUG }}
1213

1314
{{ define "upstream" }}
1415
{{ if .Address }}
@@ -194,7 +195,7 @@ server {
194195
upstream {{ $upstream_name }} {
195196

196197
{{ range $container := $containers }}
197-
{{ $debug := (eq (coalesce $container.Env.DEBUG "false") "true") }}
198+
{{ $debug := (eq (coalesce $container.Env.DEBUG $debug_all "false") "true") }}
198199
{{/* If only 1 port exposed, use that as a default, else 80 */}}
199200
{{ $defaultPort := (when (eq (len $container.Addresses) 1) (first $container.Addresses) (dict "Port" "80")).Port }}
200201
{{ range $knownNetwork := $CurrentContainer.Networks }}

0 commit comments

Comments
 (0)