Page MenuHomePhabricator
Paste P71676

WME varnish head pass
ActivePublic

Authored by BBlack on Dec 10 2024, 12:33 PM.
Referenced Files
F57794467: WME varnish head pass
Dec 10 2024, 12:42 PM
F57794457: WME varnish head pass
Dec 10 2024, 12:33 PM
Subscribers
None
diff --git modules/varnish/templates/upload-frontend.inc.vcl.erb modules/varnish/templates/upload-frontend.inc.vcl.erb
index ccf56645e7..abfb695b07 100644
--- modules/varnish/templates/upload-frontend.inc.vcl.erb
+++ modules/varnish/templates/upload-frontend.inc.vcl.erb
@@ -340,6 +340,13 @@ sub cluster_fe_miss {
}
call cluster_fe_ratelimit;
+
+ // For WME HEAD reqs to upload, if initial lookup results in a cache miss
+ // (no existing object to satisfy locally), convert to pass-mode to send
+ // the HEAD to ATS directly and not attempt caching any result.
+ if (req.http.X-Client-IP == "3.211.48.168" && req.http.Host == "upload.wikimedia.org" && req.http.User-Agent ~ "^WME/[0-9]" && req.method == "HEAD") {
+ return (pass);
+ }
}