From 0ba63db834f0764ab003e1a8293041b836cffe78 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 11 Apr 2018 11:49:44 -0400 Subject: [PATCH] Make the atomic rewrite happen at the proxies Signed-off-by: Patrick Uiterwijk --- .../reverseproxy/templates/reversepassproxy.kojipkgs.conf | 4 ++++ roles/kojipkgs/templates/kojipkgs.conf | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.kojipkgs.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.kojipkgs.conf index e7d258a722..6b8d943969 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.kojipkgs.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.kojipkgs.conf @@ -34,3 +34,7 @@ ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}} {% else %} Redirect 421 / {% endif %} + +# Atomic Objects +RewriteCond %{HTTP:X-CloudFront} !^$ +RewriteRule "/atomic/repo/objects/(.*)" "https://d2os45suu8yck8.cloudfront.net/$1" [R=302,L] diff --git a/roles/kojipkgs/templates/kojipkgs.conf b/roles/kojipkgs/templates/kojipkgs.conf index 05f7ba10b1..57f62bdd2c 100644 --- a/roles/kojipkgs/templates/kojipkgs.conf +++ b/roles/kojipkgs/templates/kojipkgs.conf @@ -130,7 +130,3 @@ RewriteRule ".*/.*openh264.*.(x86_64|armv7hl|i686|ppc64|ppc64le|aarch64|s390x).r # Set HSTS header via HTTP since it cannot be easily set in squid, which terminates HTTPS Header always add Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" - -# Atomic Objects -RewriteCond %{HTTP:X-CloudFront} !^$ -RewriteRule "/atomic/repo/objects/(.*)" "https://d2os45suu8yck8.cloudfront.net/$1" [R=302,L]