We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db6df6d commit 3b56350Copy full SHA for 3b56350
config/initializers/rack-attack.rb
@@ -1,5 +1,9 @@
1
class Rack::Attack
2
- throttle('req/ip', limit: 300, period: 5.minutes) do |req|
3
- req.ip
+ throttle('get-req/ip', limit: 300, period: 5.minutes) do |req|
+ req.ip if req.get?
4
+ end
5
+
6
+ throttle('post-req/ip', limit: 100, period: 5.minutes) do |req|
7
+ req.ip if req.post?
8
end
9
0 commit comments