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
88af2f78
Unverified
Commit
88af2f78
authored
Jul 31, 2018
by
Lasse Karstensen
Committed by
GitHub
Jul 31, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39 from goodeggs/add-yahoo-bot
Add bot detection for Yahoo! Slurp spider
parents
e5bf2ca9
ac4a395e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
controlset.txt
controlset.txt
+1
-0
devicedetect.vcl
devicedetect.vcl
+1
-0
No files found.
controlset.txt
View file @
88af2f78
...
...
@@ -12,6 +12,7 @@ bot Wotbox/2.01 (+http://www.wotbox.com/bot/)
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 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)
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)
...
...
devicedetect.vcl
View file @
88af2f78
...
...
@@ -48,6 +48,7 @@ sub devicedetect {
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"; }
...
...
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