[4.1] 9a5afcf Update devicedetect.vcl to current upstream
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Wed Feb 8 10:27:06 CET 2017
commit 9a5afcf65a9de891200caf5b656aed1a36315ca0
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