Faidon Liambotis has uploaded a new change for review.

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


Change subject: Varnish: disable WAP on mobile frontends
......................................................................

Varnish: disable WAP on mobile frontends

Unconditionally set X-WAP to "no" on the mobile frontends, essentially
lying to MediaWiki about whether this requests comes from a WAP client.
This entirely disables & kills WAP, per mobile's request. The method of
Keeping X-WAP around gives us the advantage that we can do so without
any MediaWiki changes for now and hence we can quickly rollback the
change, if needed, without even ever poisoning our caches.

After this has been deployed for a while and we're comfortable with it,
we can fix MobileFrontend's mobile detection (using e.g. X-Subdomain or
a separate header) and then kill X-WAP entirely from our VCL.

Change-Id: Ida2afe8b72697d5ba519ac121a2c8ef7ee80aab0
---
D templates/varnish/device-detection.inc.vcl.erb
M templates/varnish/mobile-frontend.inc.vcl.erb
2 files changed, 2 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/108738/1

diff --git a/templates/varnish/device-detection.inc.vcl.erb 
b/templates/varnish/device-detection.inc.vcl.erb
deleted file mode 100644
index 1bcc88c..0000000
--- a/templates/varnish/device-detection.inc.vcl.erb
+++ /dev/null
@@ -1,10 +0,0 @@
-# Varnish VCL include file for mobile device detection
-# Shared between mobile caches and bits
-
-sub device_detection {
-       if ( req.http.Accept ~ "text/vnd.wap.wml" && req.http.Accept !~ 
"text/html" ) {
-               set req.http.X-WAP = "yes";
-       } else {
-               set req.http.X-WAP = "no";
-       }
-}
\ No newline at end of file
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index f8111bd..e3f25d1 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -72,7 +72,8 @@
                unset req.http.Cookie;
        }
 
-       call device_detection;
+       /* FIXME: temporary for the migration of disabling WAP */
+       set req.http.X-WAP = "no";
 
        if ( req.http.host ~ "^test\." ) {
                return (pass);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida2afe8b72697d5ba519ac121a2c8ef7ee80aab0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <fai...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to