Exclude nagios check_http from security to security-cdn redirect
authorJulien Cristau <jcristau@debian.org>
Sat, 3 Nov 2018 15:09:25 +0000 (16:09 +0100)
committerJulien Cristau <jcristau@debian.org>
Sat, 3 Nov 2018 15:09:58 +0000 (16:09 +0100)
Prep for making that redirect global

modules/roles/templates/security_mirror/security.debian.org.erb

index 3d79591..ce8e82a 100644 (file)
 
    RewriteCond %{HTTP:Fastly-Client-IP} !. [NV]
    RewriteCond %{HTTP_USER_AGENT} "!Amazon CloudFront"
 
    RewriteCond %{HTTP:Fastly-Client-IP} !. [NV]
    RewriteCond %{HTTP_USER_AGENT} "!Amazon CloudFront"
+   RewriteCond %{HTTP_USER_AGENT} "!check_http"
    <% 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 ^/(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"
+   RewriteCond %{HTTP_USER_AGENT} "!check_http"
    <% if scope.function_onion_global_service_hostname(['security.debian.org']) -%>
    RewriteCond %{HTTP_HOST} "!=<%= scope.function_onion_global_service_hostname(['security.debian.org']) %>"
    <% end %>
    <% if scope.function_onion_global_service_hostname(['security.debian.org']) -%>
    RewriteCond %{HTTP_HOST} "!=<%= scope.function_onion_global_service_hostname(['security.debian.org']) %>"
    <% end %>