BBlack has submitted this change and it was merged.

Change subject: varnish: move IMS check above common pass-checks
......................................................................


varnish: move IMS check above common pass-checks

Change-Id: I6495750f1fe8a5896a352ca13cc9dda1ae499285
---
M templates/varnish/mobile-frontend.inc.vcl.erb
M templates/varnish/text-frontend.inc.vcl.erb
2 files changed, 12 insertions(+), 12 deletions(-)

Approvals:
  Krinkle: Looks good to me, but someone else must approve
  BBlack: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 9f8c15f..685e4c3 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -75,6 +75,12 @@
                set req.http.X-Wikimedia-Debug = "1";
        }
 
+       // Users that just logged out, should not get a 304 for their
+       // (locally cached) logged in pages.
+       if (req.http.If-Modified-Since && req.http.Cookie ~ "LoggedOut") {
+               unset req.http.If-Modified-Since;
+       }
+
        if (req.url ~ "^/wiki/Special:CentralAutoLogin/") {
                set req.backend = backend_random;
                set req.hash_ignore_busy = true;
@@ -85,12 +91,6 @@
        if (req.request != "GET" && req.request != "HEAD") {
                set req.backend = backend_random;
                return (pass);
-       }
-
-       // Users that just logged out, should not get a 304 for their
-       // (locally cached) logged in pages.
-       if (req.http.If-Modified-Since && req.http.Cookie ~ "LoggedOut") {
-               unset req.http.If-Modified-Since;
        }
 
        call evaluate_cookie;
diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index 6fcfe5c..29b5f0e 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -83,6 +83,12 @@
                set req.http.X-Wikimedia-Debug = "1";
        }
 
+       // Users that just logged out, should not get a 304 for their
+       // (locally cached) logged in pages.
+       if (req.http.If-Modified-Since && req.http.Cookie ~ "LoggedOut") {
+               unset req.http.If-Modified-Since;
+       }
+
        if (req.url ~ "^/wiki/Special:CentralAutoLogin/") {
                set req.backend = backend_random;
                set req.hash_ignore_busy = true;
@@ -93,12 +99,6 @@
        if (req.request != "GET" && req.request != "HEAD") {
                set req.backend = backend_random;
                return (pass);
-       }
-
-       // Users that just logged out, should not get a 304 for their
-       // (locally cached) logged in pages.
-       if (req.http.If-Modified-Since && req.http.Cookie ~ "LoggedOut") {
-               unset req.http.If-Modified-Since;
        }
 
        call evaluate_cookie;

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

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

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

Reply via email to