BBlack has uploaded a new change for review.

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

Change subject: vcl_cookies: re-arrange mobile recv order a bit to match text
......................................................................

vcl_cookies: re-arrange mobile recv order a bit to match text

This moves X-Wikimedia-Debug checks and !GET/HEAD->pass above the
last-access and cookie stuff like text.

Bug: T109286
Change-Id: I3b1174237cba610b484d44705dd43751942f08ac
---
M templates/varnish/mobile-backend.inc.vcl.erb
M templates/varnish/mobile-frontend.inc.vcl.erb
2 files changed, 8 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/232517/1

diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index de431c1..4862bba 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -19,13 +19,12 @@
        }
 <% end -%>
 
-       call evaluate_cookie_mobile;
-
-       // Default (now modified) Varnish vcl_recv function
        if (req.request != "GET" && req.request != "HEAD") {
-               // We only deal with GET and HEAD by default
                return (pass);
        }
+
+       call evaluate_cookie_mobile;
+
        if (req.http.Authorization || req.http.Cookie) {
                // Not cacheable by default
                return (pass);
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 55140bf..efc1187 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -61,19 +61,18 @@
        # normalize all /static to the same hostname for caching
        if (req.url ~ "^/static/") { set req.http.host = "www.wikimedia.org"; }
 
-       call analytics_last_access_recv;
-
-       call evaluate_cookie_mobile;
-
        if (req.http.host ~ "^test\.") {
                set req.http.X-Wikimedia-Debug = "1";
        }
 
-       // Default (now modified) Varnish vcl_recv function
        if (req.request != "GET" && req.request != "HEAD") {
-               // We only deal with GET and HEAD by default
                return (pass);
        }
+
+       call analytics_last_access_recv;
+
+       call evaluate_cookie_mobile;
+
        if (req.http.Authorization || req.http.Cookie) {
                // Not cacheable by default
                return (pass);

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

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

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

Reply via email to