summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Bean <rbean@redhat.com>2014-12-08 17:37:48 +0000
committerRalph Bean <rbean@redhat.com>2014-12-08 17:37:48 +0000
commit5ac91369730715591e2ea6e52fea1e080e47a3ef (patch)
treefeaef768e3ade3a0b90131290644e62dc1dbf41e
parentbfd7cb3b5ff36bba31a4bc7c2c6e4aa6a24be89b (diff)
Some apps need to set this header.
-rw-r--r--playbooks/groups/proxies-reverseproxy.yml6
-rw-r--r--roles/httpd/reverseproxy/templates/reversepassproxy.conf2
-rw-r--r--roles/httpd/reverseproxy/vars/main.yml3
3 files changed, 8 insertions, 3 deletions
diff --git a/playbooks/groups/proxies-reverseproxy.yml b/playbooks/groups/proxies-reverseproxy.yml
index 2dc07d36b..15650bbd3 100644
--- a/playbooks/groups/proxies-reverseproxy.yml
+++ b/playbooks/groups/proxies-reverseproxy.yml
@@ -61,12 +61,12 @@
website: taskotron.stg.fedoraproject.org
destname: taskotron
# Talk directly to the app server, not haproxy
- proxyurl: http://taskotron-stg01.qa.fedoraproject.org/
+ proxyurl: http://taskotron-stg01.qa.fedoraproject.org
- role: httpd/reverseproxy
website: meetbot.fedoraproject.org
destname: meetbot
- localpath: /meetbot
+ remotepath: /meetbot/
# Talk directly to the app server, not haproxy
proxyurl: http://value01
@@ -82,6 +82,7 @@
destname: nuancier
localpath: /nuancier
remotepath: /nuancier
+ header_scheme: true
proxyurl: http://localhost:10035
- role: httpd/reverseproxy
@@ -89,6 +90,7 @@
destname: github2fedmsg
localpath: /github2fedmsg
remotepath: /github2fedmsg
+ header_scheme: true
proxyurl: http://localhost:10037
- role: httpd/reverseproxy
diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.conf
index c79ddf9ea..6fad6b3bc 100644
--- a/roles/httpd/reverseproxy/templates/reversepassproxy.conf
+++ b/roles/httpd/reverseproxy/templates/reversepassproxy.conf
@@ -3,5 +3,7 @@ RewriteEngine On
RewriteRule ^{{remotepath}}$ %{REQUEST_URI}/ [R=301]
{% endif %}
+{% if header_scheme %}RequestHeader set X-Forwarded-Scheme https early
+{% 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 17df0b487..61ee936ff 100644
--- a/roles/httpd/reverseproxy/vars/main.yml
+++ b/roles/httpd/reverseproxy/vars/main.yml
@@ -1,4 +1,5 @@
remotepath: /
localpath: /
-rewrite: false
destname: reversepassproxy
+rewrite: false
+header_scheme: false