diff --git a/lib/mobile_detection.rb b/lib/mobile_detection.rb index 0ebdb14ddee..9dc0e17995a 100644 --- a/lib/mobile_detection.rb +++ b/lib/mobile_detection.rb @@ -1,6 +1,6 @@ module MobileDetection def self.mobile_device?(user_agent) - user_agent =~ /Mobile|webOS|Nexus (5|6|7)/ && !(user_agent =~ /iPad/) + user_agent =~ /Mobile|Android|webOS/ && !(user_agent =~ /iPad|Nexus (9|10)/) end # we need this as a reusable chunk that is called from the cache diff --git a/script/nginx_analyze.rb b/script/nginx_analyze.rb index 3be44f54469..90d415258a3 100644 --- a/script/nginx_analyze.rb +++ b/script/nginx_analyze.rb @@ -37,7 +37,7 @@ class LogAnalyzer end def is_mobile? - user_agent =~ /Mobile|webOS|Nexus (5|6|7)/ && !(user_agent =~ /iPad/) + user_agent =~ /Mobile|Android|webOS/ && !(user_agent =~ /iPad|Nexus (7|10)/) end def parsed_time