nginx_proxy_define_header_host
This commit is contained in:
parent
db109326d8
commit
1cc1f240bb
|
@ -57,6 +57,7 @@ nginx_css_js_cache_expire: -1
|
||||||
|
|
||||||
nginx_reverse_proxy: False
|
nginx_reverse_proxy: False
|
||||||
nginx_define_x_real_ip: False
|
nginx_define_x_real_ip: False
|
||||||
|
nginx_proxy_define_header_host: True
|
||||||
nginx_set_original_uri: True
|
nginx_set_original_uri: True
|
||||||
nginx_proxy_buffering: "on"
|
nginx_proxy_buffering: "on"
|
||||||
nginx_proxy_redirect: "off"
|
nginx_proxy_redirect: "off"
|
||||||
|
|
|
@ -3,14 +3,18 @@
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
{% if haproxy_ips is defined %}
|
{% if haproxy_ips is defined %}
|
||||||
|
{% if not nginx_proxy_define_header_host %}
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
|
{% endif %}
|
||||||
{% if nginx_behind_haproxy_settings %}
|
{% if nginx_behind_haproxy_settings %}
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-Host {{ nginx_x_forwarded_host }};
|
proxy_set_header X-Forwarded-Host {{ nginx_x_forwarded_host }};
|
||||||
proxy_set_header X-Forwarded-Server $host;
|
proxy_set_header X-Forwarded-Server $host;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
{% if not nginx_proxy_define_header_host %}
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
{% endif %}
|
||||||
{% if nginx_define_x_real_ip %}
|
{% if nginx_define_x_real_ip %}
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue