summaryrefslogtreecommitdiffstats
path: root/roles/httpd/reverseproxy
diff options
context:
space:
mode:
authorPatrick Uiterwijk <puiterwijk@redhat.com>2016-03-10 22:07:29 +0000
committerPatrick Uiterwijk <puiterwijk@redhat.com>2016-03-10 22:07:34 +0000
commitc0b7382df2ad09bd9f1281eb3e61bf206d2df7fd (patch)
tree522196ff3a3ad1d63f5ebebc8b172c1375984e77 /roles/httpd/reverseproxy
parent7f5bfecaa7410aa08fc81f543fbba1089c9e3c67 (diff)
downloadansible-c0b7382df2ad09bd9f1281eb3e61bf206d2df7fd.tar.gz
ansible-c0b7382df2ad09bd9f1281eb3e61bf206d2df7fd.tar.xz
ansible-c0b7382df2ad09bd9f1281eb3e61bf206d2df7fd.zip
Allow to keep the host header through a setting
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'roles/httpd/reverseproxy')
-rw-r--r--roles/httpd/reverseproxy/tasks/main.yml1
-rw-r--r--roles/httpd/reverseproxy/templates/reversepassproxy.conf5
-rw-r--r--roles/httpd/reverseproxy/vars/main.yml1
3 files changed, 7 insertions, 0 deletions
diff --git a/roles/httpd/reverseproxy/tasks/main.yml b/roles/httpd/reverseproxy/tasks/main.yml
index c4fa7bb0c..bb69f55c1 100644
--- a/roles/httpd/reverseproxy/tasks/main.yml
+++ b/roles/httpd/reverseproxy/tasks/main.yml
@@ -4,6 +4,7 @@
# - remotepath..
# - proxyurl
# - rewrite
+# - keephost
- name: Copy in ProxyPassReverse for {{destname}} ({{website}}{{remotepath}})
template: >
diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.conf
index 4304709d4..b7d6ff06d 100644
--- a/roles/httpd/reverseproxy/templates/reversepassproxy.conf
+++ b/roles/httpd/reverseproxy/templates/reversepassproxy.conf
@@ -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}}
diff --git a/roles/httpd/reverseproxy/vars/main.yml b/roles/httpd/reverseproxy/vars/main.yml
index 61ee936ff..751fac42b 100644
--- a/roles/httpd/reverseproxy/vars/main.yml
+++ b/roles/httpd/reverseproxy/vars/main.yml
@@ -3,3 +3,4 @@ localpath: /
destname: reversepassproxy
rewrite: false
header_scheme: false
+keephost: false