proxies / mirrormanager / download redirect: fix https/http mixing
Fixes https://pagure.io/fedora-infrastructure/issue/9564 download.fedoraproject.org queries mirrormanager for a redirect to a mirror for the path/request. Before we were just taking any mirror that mirrormanager had, if it was http or https. This caused requests that were sent in as https to get a http mirror and error out. So, now we just redirect http ones to http mirrors and https requests to https mirrors. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
57a7a855b6
commit
765e526a83
1 changed files with 6 additions and 3 deletions
|
@ -10,8 +10,11 @@ RewriteRule (.*) - [F]
|
|||
|
||||
RewriteRule ^/$ https://getfedora.org/ [R=302,L]
|
||||
|
||||
RewriteRule ^/pub/epel/7Server/(.+) http://localhost:10002/mirrorlist?path=pub/epel/7/$1&redirect=1 [P,QSA,L]
|
||||
RewriteRule ^/(.+) {{proxyurl}}/mirrorlist?path=$1&redirect=1 [P,QSA,L]
|
||||
RewriteRule ^/$ {{proxyurl}}/mirrorlist?path=pub/fedora/linux/&redirect=1 [P,QSA,L]
|
||||
# http connection, return http mirrors
|
||||
RewriteCond %{HTTPS} "off"
|
||||
RewriteRule ^/(.+) http://localhost:10002/mirrorlist?path=$1&redirect=1&protocol=http [P,QSA,L]
|
||||
# https connection, return https mirrors
|
||||
RewriteCond %{HTTPS} "on"
|
||||
RewriteRule ^/(.+) http://localhost:10002/mirrorlist?path=$1&redirect=1&protocol=https [P,QSA,L]
|
||||
|
||||
ProxyPassReverse / {{proxyurl}}/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue