Ema has uploaded a new change for review. https://gerrit.wikimedia.org/r/323135
Change subject: cache_upload: stop graphiq.com buggy javascript ...................................................................... cache_upload: stop graphiq.com buggy javascript A bug in graphiq.com's javascript is responsible for thousands of pointless requests to cache_upload. Turn graphiq.com 404s into 401s to mitigate the impact. Bug: T151444 Change-Id: Id34a902cc29b95e7b73bb641fe0cd7e5a521b8ce --- M modules/varnish/templates/upload-frontend.inc.vcl.erb 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/323135/1 diff --git a/modules/varnish/templates/upload-frontend.inc.vcl.erb b/modules/varnish/templates/upload-frontend.inc.vcl.erb index 3e80280..8c27b1c 100644 --- a/modules/varnish/templates/upload-frontend.inc.vcl.erb +++ b/modules/varnish/templates/upload-frontend.inc.vcl.erb @@ -91,6 +91,12 @@ } sub cluster_fe_deliver { + // graphiq.com javascript bug (T151444) + if (resp.status == 404 && req.http.Referer ~ "^https://w.graphiq.com/w/") { + set resp.status = 401; + set resp.http.WWW-Authenticate = {"Basic realm="Buggy request, please report at https://www.graphiq.com/contact-us""}; + } + call upload_common_deliver; // The upload cluster does not serve page views or authenticated requests, so keep -- To view, visit https://gerrit.wikimedia.org/r/323135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id34a902cc29b95e7b73bb641fe0cd7e5a521b8ce Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ema <e...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits