Mark Bergsma has submitted this change and it was merged.
Change subject: Add all mobile UAs currently listed in the Squid configuration
......................................................................
Add all mobile UAs currently listed in the Squid configuration
Change-Id: I75481495b7f1bd8379426e44d3aad1da63527bac
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Mark Bergsma: Verified; Looks good to me, approved
diff --git a/templates/varnish/text-frontend.inc.vcl.erb
b/templates/varnish/text-frontend.inc.vcl.erb
index ab06f59..79e40f3 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -4,7 +4,8 @@
include "text-common.inc.vcl";
sub mobile_redirect {
- if ((req.http.User-Agent ~ "mobi" || req.http.Accept ~ "vnd.wap.wml")
+ if ((req.http.User-Agent ~
"(?i)(mobi|240x240|240x320|320x320|alcatel|android|audiovox|bada|benq|blackberry|cdm-|compal-|docomo|ericsson|hiptop|htc[-_]|huawei|ipod|kddi-|kindle|meego|midp|mitsu|mmp\/|mot-|motor|ngm_|nintendo|opera.m|palm|panasonic|philips|phone|playstation|portalmmm|sagem-|samsung|sanyo|sec-|sendo|sharp|softbank|symbian|teleca|up.browser|webos)"
+ || req.http.User-Agent ~ "^(lge?|sie|nec|sgh|pg)-" ||
req.http.Accept ~ "vnd.wap.wml")
&& req.http.User-Agent !~
"(iPad|Android.3|(?i)tablet|(?i)(?!google)bot|PlayBook|Wii)"
&& req.http.Cookie !~
"(stopMobileRedirect=true|mf_useformat=desktop)"
&& req.url ~ "^/wiki/") {
@@ -66,4 +67,4 @@
call errorpage;
return(deliver);
-}
\ No newline at end of file
+}
--
To view, visit https://gerrit.wikimedia.org/r/65823
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I75481495b7f1bd8379426e44d3aad1da63527bac
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma <[email protected]>
Gerrit-Reviewer: Mark Bergsma <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits