Skip to content

Commit

Permalink
Added detection for the new Microsoft Surface Devices - @see https://…
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco De Freitas committed Sep 17, 2015
1 parent eb52fd3 commit 17c109a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion devicedetect.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ sub devicedetect {
elsif (req.http.User-Agent ~ "PlayBook; U; RIM Tablet") { set req.http.X-UA-Device = "tablet-rim"; }
elsif (req.http.User-Agent ~ "hp-tablet.*TouchPad") { set req.http.X-UA-Device = "tablet-hp"; }
elsif (req.http.User-Agent ~ "Kindle/3") { set req.http.X-UA-Device = "tablet-kindle"; }
elsif (req.http.User-Agent ~ "Touch.+Tablet PC") { set req.http.X-UA-Device = "tablet-microsoft"; }
elsif (req.http.User-Agent ~ "Touch.+Tablet PC" ||
req.http.User-Agent ~ "Windows NT [0-9.]+; [ARM;|WOW64;|Win64; x64]" ) {
set req.http.X-UA-Device = "tablet-microsoft";
}
elsif (req.http.User-Agent ~ "Mobile.+Firefox") { set req.http.X-UA-Device = "mobile-firefoxos"; }
elsif (req.http.User-Agent ~ "^HTC" ||
req.http.User-Agent ~ "Fennec" ||
Expand Down

2 comments on commit 17c109a

@fgsch
Copy link
Member

@fgsch fgsch commented on 17c109a Jan 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern is not correct. The second [] should be ().
The architecture is only valid on IE 10 under Windows 8 or later.

This needs to be studied a bit further but I don't think this change is correct.

@RyanJarv
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran into this matching Windows 64 bit chrome user-agents. Talked a bit more on this here #31.

Please sign in to comment.