mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-22 07:14:18 +08:00
5 lines
195 B
Ruby
Vendored
5 lines
195 B
Ruby
Vendored
module CrawlerDetection
|
|
def self.crawler?(user_agent)
|
|
!/Googlebot|Mediapartners|AdsBot|curl|Twitterbot|facebookexternalhit|bingbot|Baiduspider|ia_archiver/.match(user_agent).nil?
|
|
end
|
|
end
|