Created
June 28, 2018 20:01
-
-
Save dpaluy/8ef113476ff379fbc0a2dd4bbf08ce75 to your computer and use it in GitHub Desktop.
ignore PHP bots
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
| class Rack::Attack | |
| Rack::Attack.blocklist('bad-robots') do |req| | |
| req.ip if /\S+\.php/.match?(req.path) | |
| end | |
| end if Rail.env.production? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment