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
3fb4749d
Commit
3fb4749d
authored
Jan 21, 2014
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Opera Mobi fixes as proposed in issue #8
parent
f37c40ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
devicedetect.vcl
devicedetect.vcl
+3
-2
No files found.
devicedetect.vcl
View file @
3fb4749d
...
...
@@ -51,6 +51,8 @@ sub devicedetect {
elsif (req.http.User-Agent ~ "(?i)android.*(mobile|mini)") { set req.http.X-UA-Device = "mobile-android"; }
// android 3/honeycomb was just about tablet-only, and any phones will probably handle a bigger page layout.
elsif (req.http.User-Agent ~ "(?i)android 3") { set req.http.X-UA-Device = "tablet-android"; }
/* see http://my.opera.com/community/openweb/idopera/ */
elsif (req.http.User-Agent ~ "Opera Mobi") { set req.http.X-UA-Device = "mobile-smartphone"; }
// May very well give false positives towards android tablets. Suggestions welcome.
elsif (req.http.User-Agent ~ "(?i)android") { set req.http.X-UA-Device = "tablet-android"; }
elsif (req.http.User-Agent ~ "PlayBook; U; RIM Tablet") { set req.http.X-UA-Device = "tablet-rim"; }
...
...
@@ -63,8 +65,7 @@ sub devicedetect {
req.http.User-Agent ~ "BlackBerry" ||
req.http.User-Agent ~ "BB10.*Mobile" ||
req.http.User-Agent ~ "GT-.*Build/GINGERBREAD" ||
req.http.User-Agent ~ "SymbianOS.*AppleWebKit" ||
req.http.User-Agent ~ "Opera Mobi") {
req.http.User-Agent ~ "SymbianOS.*AppleWebKit") {
set req.http.X-UA-Device = "mobile-smartphone";
}
elsif (req.http.User-Agent ~ "(?i)symbian" ||
...
...
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