[master] 215fe8eb8 Update device detection VCL

Federico G. Schwindt fgsch at lodoss.net
Fri Jul 19 10:50:08 UTC 2019


commit 215fe8eb8c47450d1e67e35603c8e28f128ffaf6
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Thu Jul 18 00:41:38 2019 +0100

    Update device detection VCL

diff --git a/etc/devicedetect.vcl b/etc/devicedetect.vcl
index 1910743f4..cabc16a45 100644
--- a/etc/devicedetect.vcl
+++ b/etc/devicedetect.vcl
@@ -1,4 +1,6 @@
-# Copyright (c) 2012-2014 Varnish Software AS
+#
+# Copyright (c) 2016-2018 Varnish Cache project
+# Copyright (c) 2012-2016 Varnish Software AS
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -24,7 +26,7 @@
 # detectdevice.vcl - regex based device detection for Varnish
 # https://github.com/varnishcache/varnish-devicedetect/
 #
-# Author: Lasse Karstensen <lkarsten at varnish-software.com>
+# Original author: Lasse Karstensen <lkarsten at varnish-software.com>
 
 sub devicedetect {
 	unset req.http.X-UA-Device;
@@ -45,7 +47,10 @@ sub devicedetect {
             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" ||
+		    req.http.User-Agent ~ "(?i)pingdom" ||
+		    req.http.User-Agent ~ "(?i)facebookexternalhit" ||
 		    req.http.User-Agent ~ "(?i)scanner" ||
+		    req.http.User-Agent ~ "(?i)slurp" ||
 		    req.http.User-Agent ~ "(?i)(web)crawler") {
 			set req.http.X-UA-Device = "bot"; }
 		elsif (req.http.User-Agent ~ "(?i)ipad")        { set req.http.X-UA-Device = "tablet-ipad"; }
@@ -94,8 +99,6 @@ sub devicedetect {
 		    req.http.User-Agent ~ "(?i)playstation portable" ||
 		    req.http.User-Agent ~ "(?i)portalmmm" ||
 		    req.http.User-Agent ~ "(?i)proxinet" ||
-		    req.http.User-Agent ~ "(?i)sonyericsson" ||
-		    req.http.User-Agent ~ "(?i)symbian" ||
 		    req.http.User-Agent ~ "(?i)windows\ ?ce" ||
 		    req.http.User-Agent ~ "(?i)winwap" ||
 		    req.http.User-Agent ~ "(?i)eudoraweb" ||


More information about the varnish-commit mailing list