BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/207476
Change subject: block off the _preconnect spam from VE ...................................................................... block off the _preconnect spam from VE (doing mobile too, JIC) Change-Id: Ie5584dd9fb601bce56c94238fd705e0c63e0233c --- M templates/varnish/mobile-frontend.inc.vcl.erb M templates/varnish/text-frontend.inc.vcl.erb 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/76/207476/1 diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb b/templates/varnish/mobile-frontend.inc.vcl.erb index 042bafe..bec1b53 100644 --- a/templates/varnish/mobile-frontend.inc.vcl.erb +++ b/templates/varnish/mobile-frontend.inc.vcl.erb @@ -33,6 +33,10 @@ if (req.http.referer && req.http.referer ~ "^http://(www\.(keeprefreshing|refreshthis|refresh-page|urlreload)\.com|tuneshub\.blogspot\.com|itunes24x7\.blogspot\.com|autoreload\.net|www\.lazywebtools\.co\.uk)/") { error 403 "Noise"; } + // Dummy endpoint for eager DNS resolution / TLS handshake. + if (req.url ~ "^/_preconnect") { + error 204; + } } sub vcl_recv { diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index 23fef9a..fb64ce0 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -81,6 +81,10 @@ if (req.url ~ "^/w/api.php\?srsearch=Sju\+svarta" && req.http.User-Agent ~ "wikipedia") { error 403 "Stop doing this :p"; } + // Dummy endpoint for eager DNS resolution / TLS handshake. + if (req.url ~ "^/_preconnect") { + error 204; + } } sub vcl_recv { -- To view, visit https://gerrit.wikimedia.org/r/207476 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5584dd9fb601bce56c94238fd705e0c63e0233c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack <bbl...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits