Enable proxying of copr api_2 and api_3

This commit is contained in:
Mikolaj Izdebski 2018-09-27 09:28:14 +00:00
parent 0a67a43d54
commit 735d10275c
3 changed files with 5 additions and 7 deletions

View file

@ -33,9 +33,6 @@
- role: httpd/reverseproxy
website: copr.fedoraproject.org
destname: coprapi
localpath: /api
remotepath: /api
proxyurl: https://copr.fedorainfracloud.org
when: env != "staging"
tags: copr

View file

@ -1,4 +1,3 @@
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/api/*
RewriteCond %{REQUEST_URI} !^/api_2/*
RewriteCond %{REQUEST_URI} !^/api
RewriteRule ^/(.*) https://copr.fedorainfracloud.org/$1 [L,R]

View file

@ -11,5 +11,7 @@ RequestHeader set X-Scheme https early
RequestHeader set X-Forwarded-Proto https early
{% endif %}
ProxyPass {{ localpath }} {{ proxyurl }}{{remotepath}}
ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}}
{% for path in ('api', 'api_2', 'api_3') %}
ProxyPass /{{path}} https://copr.fedorainfracloud.org/{{path}}
ProxyPassReverse /{{path}} https://copr.fedorainfracloud.org/{{path}}
{% endfor %}