mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
REFACTOR: Rename GooglebotDetection to CrawlerDetection because we
will likely whitelist more crawlers in the future.
This commit is contained in:
5
lib/crawler_detection.rb
Normal file
5
lib/crawler_detection.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
module CrawlerDetection
|
||||
def self.crawler?(user_agent)
|
||||
!/Googlebot|Mediapartners|AdsBot/.match(user_agent).nil?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user