Merge pull request 'nginx: optionally add proxy_set_header nginx-request-uri $request_uri' (#171) from adellam/ansible-roles:master into master

This commit is contained in:
Andrea Dell'Amico 2020-04-03 15:17:40 +02:00
commit 8984e5cfb1
2 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,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_set_original_uri: True
nginx_proxy_buffering: "on" nginx_proxy_buffering: "on"
nginx_proxy_redirect: "off" nginx_proxy_redirect: "off"
nginx_proxy_buffer_size: 128k nginx_proxy_buffer_size: 128k

View File

@ -13,6 +13,9 @@ proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if nginx_set_original_uri %}
proxy_set_header nginx-request-uri $request_uri;
{% endif %}
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering {{ nginx_proxy_buffering }}; proxy_buffering {{ nginx_proxy_buffering }};