Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-devicedetect
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-devicedetect
Commits
0bf6c091
Unverified
Commit
0bf6c091
authored
Jul 31, 2018
by
Lasse Karstensen
Committed by
GitHub
Jul 31, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into add-pingdom-bot
parents
6210e0bb
18262035
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
.travis.yml
.travis.yml
+6
-6
controlset.txt
controlset.txt
+1
-0
devicedetect.vcl
devicedetect.vcl
+1
-2
No files found.
.travis.yml
View file @
0bf6c091
language
:
c
before_install
:
-
sudo apt-get update
-qq
-
sudo apt-get install -
qq apt-transport-https python-docutils
-
curl
https://repo.varnish-cache.org/debian/GPG-key.txt
| sudo apt-key add -
-
echo "deb https://
repo.varnish-cache.org/ubuntu/ precise varnish-4.0
" | sudo tee /etc/apt/sources.list.d/varnish-cache.list
-
sudo apt-get
-qq
update
-
sudo apt-get install
varnish
-
sudo apt-get update
-
sudo apt-get install -
y apt-transport-https python-docutils curl
-
curl
-L https://packagecloud.io/varnishcache/varnish41/gpgkey
| sudo apt-key add -
-
echo "deb https://
packagecloud.io/varnishcache/varnish41/ubuntu/ precise main
" | sudo tee /etc/apt/sources.list.d/varnish-cache.list
-
sudo apt-get update
-
sudo apt-get install
-y varnish varnish-dev
script
:
-
make initial
...
...
controlset.txt
View file @
0bf6c091
...
...
@@ -13,6 +13,7 @@ bot Mozilla/5.0 (compatible; AhrefsBot/3.1; +http://ahrefs.com/robot/)
bot Baiduspider+(+http://www.baidu.com/search/spider.htm)
bot Mozilla/5.0 (compatible; SeznamBot/3.2; +http://fulltext.sblog.cz/)
bot Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) PingdomTMS/0.8.5 Safari/534.34
bot facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
# from https://developers.google.com/webmasters/mobile-sites/references/googlebot
mobile-bot DoCoMo/2.0 N905i(c100;TB;W24H16) (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)
...
...
devicedetect.vcl
View file @
0bf6c091
...
...
@@ -46,6 +46,7 @@ sub devicedetect {
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)(web)crawler") {
set req.http.X-UA-Device = "bot"; }
...
...
@@ -95,8 +96,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" ||
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment