mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
Detect Googlebot from user agent and use a different layout that doesn't load javascript
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
module GooglebotDetection
|
||||
def self.googlebot?(user_agent)
|
||||
!/Googlebot|Mediapartners|AdsBot/.match(user_agent).nil?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user