We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6ac57e commit 60b680cCopy full SHA for 60b680c
config/initializers/rack_attack.rb
@@ -1,6 +1,10 @@
1
class Rack::Attack
2
Rack::Attack.enabled = Rails.env.production?
3
4
+ Rack::Attack.throttle("requests by ip", limit: 5, period: 2) do |request|
5
+ request.ip
6
+ end
7
+
8
Rack::Attack.blocklist("php-bots") do |req|
9
req.ip if /\S+\.php/.match?(req.path)
10
end
0 commit comments