Allow to keep the host header through a setting

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2016-03-10 22:07:29 +00:00
parent 7f5bfecaa7
commit c0b7382df2
4 changed files with 8 additions and 0 deletions

View file

@ -455,6 +455,7 @@
destname: qa-stg-phab
# Talk directly to the app server, not haproxy
proxyurl: http://phab.qa-stg01.qa.fedoraproject.org
keephost: true
when: env == "staging"
- role: httpd/reverseproxy

View file

@ -4,6 +4,7 @@
# - remotepath..
# - proxyurl
# - rewrite
# - keephost
- name: Copy in ProxyPassReverse for {{destname}} ({{website}}{{remotepath}})
template: >

View file

@ -9,5 +9,10 @@ RequestHeader set X-Scheme https early
RequestHeader set X-Forwarded-Proto https early
{% endif %}
{% if keephost %}
ProxyPreserveHost On
{% endif %}
ProxyPass {{ localpath }} {{ proxyurl }}{{remotepath}}
ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}}

View file

@ -3,3 +3,4 @@ localpath: /
destname: reversepassproxy
rewrite: false
header_scheme: false
keephost: false