From 2b4de7b85dcb4228354153f38b7b0df2a3bcd2fc Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: Sat, 18 Jan 2025 10:39:10 +0100 Subject: [PATCH] another try on registry redirection Signed-off-by: Mattia Verga --- playbooks/include/proxies-redirects.yml | 10 ++++++++++ .../templates/reversepassproxy.registry-generic.conf | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/playbooks/include/proxies-redirects.yml b/playbooks/include/proxies-redirects.yml index 2b2f4a7f45..fbc7d947f4 100644 --- a/playbooks/include/proxies-redirects.yml +++ b/playbooks/include/proxies-redirects.yml @@ -926,3 +926,13 @@ tags: - cle - docs + + # old registry.fedoraproject.org web interface + - role: httpd/redirectmatch + shortname: reg-server-stg + website: registry.fedoraproject.org + regex: ^(index\.html|repo(.)*)?$ + target: https://quay.io/organization/fedora/ + when: env == 'staging' + tags: + - registry diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf index 69b5e4a391..c0d822d36d 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf @@ -23,12 +23,6 @@ RewriteCond expr "! -R '10.3.171.0/24'" RewriteRule ^/v2/(.*)/blobs/([a-zA-Z0-9:]*) https://cdn.registry.fedoraproject.org/v2/$1/blobs/$2 [R] {% endif %} -{% if env == "staging" %} -# registry.fedoraproject.org web interface previously served by reg-server -RewriteCond %{HTTP_HOST} ^registry\{{env_suffix}}\.fedoraproject\.org$ -RewriteRule ^(index\.html|repo(.)*)?$ https://quay.io/organization/fedora/ [R=301,L] -{% endif %} - # This is terible, but Docker. RewriteCond %{REQUEST_METHOD} ^(PATCH|POST|PUT|DELETE)$ {% if env == "production" %}