mirror of
				https://github.com/thib8956/nginx-proxy
				synced 2025-11-04 02:59:20 +00:00 
			
		
		
		
	fix: Use parseBool to parse boolean strings
				
					
				
			This commit is contained in:
		@@ -92,7 +92,7 @@
 | 
			
		||||
upstream {{ .Upstream }} {
 | 
			
		||||
	{{ $server_found := false }}
 | 
			
		||||
	{{ range $container := .Containers }}
 | 
			
		||||
        {{ $debug := (eq (coalesce $container.Env.DEBUG $debug_all "false") "true") }}
 | 
			
		||||
        {{ $debug := parseBool (coalesce $container.Env.DEBUG $debug_all "false") }}
 | 
			
		||||
        {{/* If only 1 port exposed, use that as a default, else 80 */}}
 | 
			
		||||
        {{ $defaultPort := (when (eq (len $container.Addresses) 1) (first $container.Addresses) (dict "Port" "80")).Port }}
 | 
			
		||||
        {{ $port := (coalesce $container.Env.VIRTUAL_PORT $defaultPort) }}
 | 
			
		||||
@@ -229,7 +229,7 @@ proxy_set_header Proxy "";
 | 
			
		||||
 | 
			
		||||
{{ $access_log := (or (and (not $.Env.DISABLE_ACCESS_LOGS) "access_log /var/log/nginx/access.log vhost;") "") }}
 | 
			
		||||
 | 
			
		||||
{{ $enable_ipv6 := eq (or ($.Env.ENABLE_IPV6) "") "true" }}
 | 
			
		||||
{{ $enable_ipv6 := parseBool (coalesce $.Env.ENABLE_IPV6 "false") }}
 | 
			
		||||
server {
 | 
			
		||||
	server_name _; # This is just an invalid value which will never trigger on a real hostname.
 | 
			
		||||
	server_tokens off;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user