[PATCH] proxies: add a registry-no-cdn version 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kevin Fenzi <kevin@xxxxxxxxx>

This is the same as the last version, except we add a [OR] to make sure we match
if the connection is not via cdn and also the host is not registry-no-cdn.
Hopefully this will do it. :)

Signed-off-by: Kevin Fenzi <kevin@xxxxxxxxx>
---
 playbooks/include/proxies-websites.yml                                 | 2 +-
 .../reverseproxy/templates/reversepassproxy.registry-generic.conf      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/playbooks/include/proxies-websites.yml b/playbooks/include/proxies-websites.yml
index 8dd1740..c87677f 100644
--- a/playbooks/include/proxies-websites.yml
+++ b/playbooks/include/proxies-websites.yml
@@ -666,7 +666,7 @@
 
   - role: httpd/website
     site_name: registry.fedoraproject.org
-    server_aliases: [registry.stg.fedoraproject.org]
+    server_aliases: [registry.stg.fedoraproject.org registry-no-cdn.fedoraproject.org]
     sslonly: true
     cert_name: "{{wildcard_cert_name}}"
 
diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf
index 8a97f39..b7102e5 100644
--- a/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf
+++ b/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf
@@ -5,7 +5,8 @@ ProxyPreserveHost On
 
 
 {% if env == "production" %}
-RewriteCond %{HTTP:VIA} !cdn77
+RewriteCond %{HTTP:VIA} !cdn77 [OR]
+RewriteCond %{SERVER_NAME} !/^registry-no-cdn.fedoraproject.org$/
 RewriteCond %{REQUEST_METHOD} !^(PATCH|POST|PUT|DELETE|HEAD)$
 RewriteRule ^/v2/(.*)/blobs/([a-zA-Z0-9:]*) https://cdn.registry.fedoraproject.org/v2/$1/blobs/$2 [R]
 {% endif %}
-- 
1.8.3.1
_______________________________________________
infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux