Deploy 'brokenostreekojipkgs' to avoid https (and thus http/2) for ostree

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2018-04-17 21:51:10 +02:00
parent 024853883d
commit e7cf461e0c
4 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,44 @@
{% 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 %}
{% if header_expect %}
RequestHeader unset Expect early
{% endif %}
{% if keephost %}
ProxyPreserveHost On
{% endif %}
# This is to deal with a broken ostree (actually libcurl) that doesn't work well with ostree
# The only remaining image with this bug is F27 Fedora Atomic Workstation
# Can be nuked after F28 GA
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !^ostree\ $
RewriteRule ^(.*)$ https://kojipkgs.fedoraproject.org/$1 [L,R=302]
{% if 'phx2' in inventory_hostname %}
{% if balancer_name is defined %}
<Proxy "balancer://{{balancer_name}}">
{% for member in balancer_members %}
BalancerMember "{{ member }}/{{remotepath}}"
{% endfor %}
</Proxy>
ProxyPass {{ localpath }} "balancer://{{balancer_name}}"
{% else %}
ProxyPass {{ localpath }} {{ proxyurl }}{{remotepath}}
{% endif %}
ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}}
{% else %}
Redirect 421 /
{% endif %}

View file

@ -17,6 +17,14 @@ RequestHeader unset Expect early
ProxyPreserveHost On
{% endif %}
# This is to deal with a broken ostree (actually libcurl) that doesn't work well with ostree
# The only remaining image with this bug is F27 Fedora Atomic Workstation
# Can be nuked after F28 GA
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^ostree\ $
RewriteRule ^/atomic/repo/(.*)$ http://brokenostreekojipkgs.fedoraproject.org/atomic/repo/$1 [L,R=302]
{% if 'phx2' in inventory_hostname %}
{% if balancer_name is defined %}