Mholloway has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/294361

Change subject: Oops: restore :ZeroRatedMobileAccess check
......................................................................

Oops: restore :ZeroRatedMobileAccess check

In a recent, seemingly innocuous change,[1] I removed the check for
':ZeroRatedMobileAccess' in determining whether to set the request X-CS,
since the extension by that name was retired over a year ago. It turns out
that the ZeroBanner extension still uses ':ZeroRatedMobileAccess' pages,
and in nonobvious ways, and the change appears to have broken Zero banners
on the mobile website.

This reverts it.

[1] 639f2cf1a8bfb449fb09a858330e82953886d7bb

Change-Id: Id6750d38f2b29de3d80ec5d2b6f12916119698e1
---
M templates/varnish/zero.inc.vcl.erb
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/61/294361/1

diff --git a/templates/varnish/zero.inc.vcl.erb 
b/templates/varnish/zero.inc.vcl.erb
index 387ae56..fdb2426 100644
--- a/templates/varnish/zero.inc.vcl.erb
+++ b/templates/varnish/zero.inc.vcl.erb
@@ -28,7 +28,9 @@
 
         // X-CS needs the real data only for "special" pages we vary on, and
         // can just be "ON" for normal wikitext fetches and such
-        if (req.url ~ "action=zeroconfig($|&|\?)" || req.http.host ~ 
"^(zero|m)\.") {
+        //
+        // TBD: Beware of legit links happening to have :ZeroRatedMobileAccess
+        if (req.url ~ "(action=zeroconfig|:ZeroRatedMobileAccess)($|&|\?)" || 
req.http.host ~ "^(zero|m)\.") {
             set req.http.X-CS = req.http.X-CS2;
         } else {
             set req.http.X-CS = "ON";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6750d38f2b29de3d80ec5d2b6f12916119698e1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mholloway <[email protected]>

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

Reply via email to