[master] f9591f0 Update devicedetect.vcl to current upstream
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Sep 12 12:59:12 CEST 2016
commit f9591f061e918d802f9adbe6556777ba28beaff9
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon Sep 12 12:47:16 2016 +0200
Update devicedetect.vcl to current upstream
diff --git a/etc/devicedetect.vcl b/etc/devicedetect.vcl
index 6c7e659..1910743 100644
--- a/etc/devicedetect.vcl
+++ b/etc/devicedetect.vcl
@@ -40,7 +40,8 @@ sub devicedetect {
if (req.http.Cookie ~ "^ *$") { unset req.http.Cookie; }
} else {
if (req.http.User-Agent ~ "\(compatible; Googlebot-Mobile/2.1; \+http://www.google.com/bot.html\)" ||
- (req.http.User-Agent ~ "iPhone" && req.http.User-Agent ~ "\(compatible; Googlebot/2.1; \+http://www.google.com/bot.html")) {
+ (req.http.User-Agent ~ "(Android|iPhone)" && req.http.User-Agent ~ "\(compatible.?; Googlebot/2.1.?; \+http://www.google.com/bot.html") ||
+ (req.http.User-Agent ~ "(iPhone|Windows Phone)" && req.http.User-Agent ~ "\(compatible; bingbot/2.0; \+http://www.bing.com/bingbot.htm")) {
set req.http.X-UA-Device = "mobile-bot"; }
elsif (req.http.User-Agent ~ "(?i)(ads|google|bing|msn|yandex|baidu|ro|career|seznam|)bot" ||
req.http.User-Agent ~ "(?i)(baidu|jike|symantec)spider" ||
More information about the varnish-commit
mailing list