mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: cubot android devices were detected as crawlers
This commit is contained in:
@ -22,7 +22,12 @@ module CrawlerDetection
|
||||
|
||||
if user_agent.match?(possibly_real)
|
||||
known_bots = (@matchers[SiteSetting.crawler_user_agents] ||= to_matcher(SiteSetting.crawler_user_agents))
|
||||
user_agent.match?(known_bots)
|
||||
if user_agent.match?(known_bots)
|
||||
bypass = (@matchers[SiteSetting.crawler_check_bypass_agents] ||= to_matcher(SiteSetting.crawler_check_bypass_agents))
|
||||
!user_agent.match?(bypass)
|
||||
else
|
||||
false
|
||||
end
|
||||
else
|
||||
true
|
||||
end
|
||||
|
Reference in New Issue
Block a user