BBlack has submitted this change and it was merged.

Change subject: vcl_cookies: reduce text-vs-mobile cookie variance
......................................................................


vcl_cookies: reduce text-vs-mobile cookie variance

This limits the "optin" case down to "(^|;\s*)optin=", and adds
the standard exceptions for static resources and the resource
loader.

"disable" Cookie-matching seems like it can go away too (I can't
find a source ref about it, and I don't see it in traffic), but
I'm not 100% sure yet.

Bug: T109286
Change-Id: I2a471f464bc6a9cd31438d111d137963911ad2ca
---
M templates/varnish/text-common.inc.vcl.erb
1 file changed, 5 insertions(+), 4 deletions(-)

Approvals:
  BBlack: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/varnish/text-common.inc.vcl.erb 
b/templates/varnish/text-common.inc.vcl.erb
index 695e141..1a5048e 100644
--- a/templates/varnish/text-common.inc.vcl.erb
+++ b/templates/varnish/text-common.inc.vcl.erb
@@ -35,10 +35,11 @@
 // most of this mechanism but have a different Cookie regex during
 // the refactoring process...
 sub evaluate_cookie_mobile {
-       // note extra matches for disable/optin, and lack of static and 
load.php exemptions...
-        if (req.http.Cookie ~ "disable"
-           || req.http.Cookie ~ "optin"
-           || req.http.Cookie ~ "([sS]ession|Token)=") {
+       // note extra matches for any Cookie-string that matches /disable/ 
(needs further investigation!)
+       //  and for 'optin=foo' (used for alpha/beta opt-in)
+       if (req.http.Cookie ~ "disable|((^|;\s*)optin|[sS]ession|Token)="
+           && req.url !~ "^/static/"
+           && req.url !~ "^/w/load\.php") {
                set req.hash_ignore_busy = true;
        } else {
                call stash_cookie;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a471f464bc6a9cd31438d111d137963911ad2ca
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to