Do the linux redirect to security-cdn dance on setoguchi
authorJulien Cristau <jcristau@debian.org>
Wed, 3 Jan 2018 17:16:25 +0000 (18:16 +0100)
committerJulien Cristau <jcristau@debian.org>
Wed, 3 Jan 2018 17:16:25 +0000 (18:16 +0100)
modules/roles/templates/security_mirror/security.debian.org.erb

index 95d067a..1638420 100644 (file)
    RewriteEngine on
    RewriteRule ^/$      https://www.debian.org/security/
 
-   #RewriteCond %{HTTP:Fastly-Client-IP} !. [NV]
-   #RewriteCond %{HTTP_USER_AGENT} "!Amazon CloudFront"
-   #<% if scope.function_onion_global_service_hostname(['security.debian.org']) -%>
-   #RewriteCond %{HTTP_HOST} "!=<%= scope.function_onion_global_service_hostname(['security.debian.org']) %>"
-   #<% end %>
-   #RewriteRule ^/(pool/updates/main/l/linux/.*) http://security-cdn.debian.org/$1 [L,R=302]
-   #RewriteCond %{HTTP:Fastly-Client-IP} !. [NV]
-   #RewriteCond %{HTTP_USER_AGENT} "!Amazon CloudFront"
-   #<% if scope.function_onion_global_service_hostname(['security.debian.org']) -%>
-   #RewriteCond %{HTTP_HOST} "!=<%= scope.function_onion_global_service_hostname(['security.debian.org']) %>"
-   #<% end %>
-   #RewriteRule ^/debian-security/(pool/updates/main/l/linux/.*) http://security-cdn.debian.org/$1 [L,R=302]
+   <% if @hostname == "setoguchi" %>
+   RewriteCond %{HTTP:Fastly-Client-IP} !. [NV]
+   RewriteCond %{HTTP_USER_AGENT} "!Amazon CloudFront"
+   <% if scope.function_onion_global_service_hostname(['security.debian.org']) -%>
+   RewriteCond %{HTTP_HOST} "!=<%= scope.function_onion_global_service_hostname(['security.debian.org']) %>"
+   <% end %>
+   RewriteRule ^/(pool/updates/main/l/linux/.*) http://security-cdn.debian.org/$1 [L,R=302]
+   RewriteCond %{HTTP:Fastly-Client-IP} !. [NV]
+   RewriteCond %{HTTP_USER_AGENT} "!Amazon CloudFront"
+   <% if scope.function_onion_global_service_hostname(['security.debian.org']) -%>
+   RewriteCond %{HTTP_HOST} "!=<%= scope.function_onion_global_service_hostname(['security.debian.org']) %>"
+   <% end %>
+   RewriteRule ^/debian-security/(pool/updates/main/l/linux/.*) http://security-cdn.debian.org/$1 [L,R=302]
+   <% end %>
 
    CustomLog /var/log/apache2/security.debian.org-access.log privacy
    ServerSignature On