Created
September 19, 2013 18:28
-
-
Save jookyboi/6627783 to your computer and use it in GitHub Desktop.
Determine whether a request is made by a robot. From http://stackoverflow.com/questions/5882264/ruby-on-rails-how-to-determine-if-a-request-was-made-by-a-robot-or-search-engin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request.env["HTTP_USER_AGENT"].match(/\(.*https?:\/\/.*\)/) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment