The proxy setting when behind haproxy are now optional.

This commit is contained in:
Andrea Dell'Amico 2021-05-03 19:01:37 +02:00
parent 82d5cc2ab9
commit fdd0fcfb9e
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,7 @@ nginx_proxy_read_timeout: 480s
nginx_proxy_send_timeout: 120s
nginx_proxy_temp_file_write_size: '{{ nginx_default_proxy_buffers_size * 2 }}k'
nginx_proxy_force_ranges: "off"
nginx_behind_haproxy_settings: True
nginx_client_max_body_size: 100M
nginx_client_body_timeout: 240s

View File

@ -2,6 +2,7 @@
# 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;
proxy_set_header X-Real-IP $remote_addr;
@ -13,6 +14,7 @@ proxy_set_header Host $host;
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 %}