mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Improved crawler detection: add Twitterbot, Facebook, curl, Bing, Baidu.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
module CrawlerDetection
|
||||
def self.crawler?(user_agent)
|
||||
!/Googlebot|Mediapartners|AdsBot/.match(user_agent).nil?
|
||||
!/Googlebot|Mediapartners|AdsBot|curl|Twitterbot|facebookexternalhit|bingbot|Baiduspider/.match(user_agent).nil?
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user