From 32342978d0420a2ed0776c0773fcaa288227d099 Mon Sep 17 00:00:00 2001 From: zaziemo Date: Tue, 23 Jul 2024 17:45:37 +0200 Subject: [PATCH] Reduce limit for throttling of bots --- config/initializers/rack_attack.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 437b7e129..3c0253f3f 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -24,8 +24,8 @@ class Rack::Attack # Throttle all requests by IP (60rpm) # # Key: "rack::attack:#{Time.now.to_i/:period}:req/ip:#{req.ip}" - throttle('req/ip', limit: 300, period: 5.minutes) do |req| - req.ip # unless req.path.start_with?('/assets') + throttle('req/ip', limit: 100, period: 5.minutes) do |req| + req.ip end ### Prevent Brute-Force Login Attacks ###