diff --git a/templates/nginx-proxy-params.conf.j2 b/templates/nginx-proxy-params.conf.j2 index 900ce90..4843561 100644 --- a/templates/nginx-proxy-params.conf.j2 +++ b/templates/nginx-proxy-params.conf.j2 @@ -3,7 +3,7 @@ proxy_http_version 1.1; proxy_set_header Connection ""; {% if haproxy_ips is defined %} -{% if not nginx_proxy_define_header_host %} +{% if nginx_proxy_define_header_host %} proxy_set_header Host $http_host; {% endif %} {% if nginx_behind_haproxy_settings %} @@ -12,7 +12,7 @@ proxy_set_header X-Forwarded-Host {{ nginx_x_forwarded_host }}; proxy_set_header X-Forwarded-Server $host; {% endif %} {% else %} -{% if not nginx_proxy_define_header_host %} +{% if nginx_proxy_define_header_host %} proxy_set_header Host $host; {% endif %} {% if nginx_define_x_real_ip %}