BBlack has submitted this change and it was merged.

Change subject: Chrome/41 fix: move to vcl_recv
......................................................................


Chrome/41 fix: move to vcl_recv

This doesn't work on cache hits in backend_response, obviously :P

Bug: T141786
Change-Id: I34fadd158a9e4f92cbb5a2ed049a3d9d1010cedd
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index f28e077..24f724f 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -142,6 +142,11 @@
 }
 
 sub cluster_fe_recv {
+       // Experiment on dealing with a buggy UA that's spamming requests in 
T141786
+       if (req.http.User-Agent ~ "Windows NT .*Chrome/41\.0\.2272\.76" && 
req.url == "/") {
+               <%= error_synth(400, "Buggy request, please report at 
https://phabricator.wikimedia.org/T141786";) -%>
+       }
+
        // BITS: legacy bits.wm.o domain support
        if (req.http.host == "<%= @vcl_config.fetch('bits_domain') %>") {
                if (req.url ~ "^/event\.gif") {
@@ -196,11 +201,6 @@
 <% end -%>
 
 sub cluster_fe_backend_response {
-       // Experiment on dealing with a buggy UA that's spamming requests in 
T141786
-       if (req.http.User-Agent ~ "Windows NT .*Chrome/41\.0\.2272\.76" && 
req.url == "/" && beresp.status == 301) {
-               <%= error_synth(400, "Buggy request, please report at 
https://phabricator.wikimedia.org/T141786";) -%>
-       }
-
        call text_common_backend_response;
 
        return (deliver);

-- 
To view, visit https://gerrit.wikimedia.org/r/305050
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I34fadd158a9e4f92cbb5a2ed049a3d9d1010cedd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to