COPR API goes over SSL

This commit is contained in:
Patrick Uiterwijk 2016-01-22 01:04:43 +00:00
parent 29aa7fd1b7
commit b69187c61c
2 changed files with 16 additions and 1 deletions

View file

@ -32,7 +32,7 @@
- role: httpd/reverseproxy
website: copr.fedoraproject.org
destname: api
destname: coprapi
localpath: /api
remotepath: /api
proxyurl: https://copr.fedorainfracloud.org

View file

@ -0,0 +1,15 @@
SSLProxyEngine on
{% if rewrite %}
RewriteEngine On
RewriteRule ^{{remotepath}}$ %{REQUEST_URI}/ [R=301]
{% endif %}
{% if header_scheme %}
RequestHeader set X-Forwarded-Scheme https early
RequestHeader set X-Scheme https early
RequestHeader set X-Forwarded-Proto https early
{% endif %}
ProxyPass {{ localpath }} {{ proxyurl }}{{remotepath}}
ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}}