Do not forward COPR /api requests

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2016-01-22 00:40:47 +00:00
parent 3451af3099
commit 6f990c34dd
2 changed files with 7 additions and 1 deletions

View file

@ -8,13 +8,16 @@
# This is the only real work we do.
- name: Copy over httpd redirect file for {{name}}
template: >
src=redirect.conf
src={{conf}}
dest=/etc/httpd/conf.d/{{website}}/{{name}}-redirect.conf
mode=0644
owner=root
group=root
notify:
- reload httpd
with_first_found:
- redirect.{{name}}.conf
- redirect.conf
tags:
- httpd
- httpd/redirect

View file

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