Limit the entries skipped by nginx_behind_haproxy_settings

This commit is contained in:
Andrea Dell'Amico 2021-05-03 19:10:21 +02:00
parent fdd0fcfb9e
commit 437d0a0b1e
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 2 additions and 2 deletions

View File

@ -2,19 +2,19 @@
# include /etc/nginx/snippets/nginx-proxy-params.conf;
proxy_http_version 1.1;
proxy_set_header Connection "";
{% if nginx_behind_haproxy_settings %}
{% if haproxy_ips is defined %}
proxy_set_header Host $http_host;
{% if nginx_behind_haproxy_settings %}
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host {{ nginx_x_forwarded_host }};
proxy_set_header X-Forwarded-Server $host;
{% endif %}
{% else %}
proxy_set_header Host $host;
{% if nginx_define_x_real_ip %}
proxy_set_header X-Real-IP $remote_addr;
{% endif %}
{% endif %}
{% endif %}
{% if nginx_set_original_uri %}
proxy_set_header nginx-request-uri $request_uri;
{% endif %}