diff --git a/config/initializers/rack_attack.rb.example b/config/initializers/rack_attack.rb.example index c6d3605..1d2dee9 100644 --- a/config/initializers/rack_attack.rb.example +++ b/config/initializers/rack_attack.rb.example @@ -7,6 +7,9 @@ paths_to_be_protected = [ "#{Rails.application.config.relative_url_root}/users/sign_in", "#{Rails.application.config.relative_url_root}/users" ] -Rack::Attack.throttle('protected paths', limit: 6, period: 60.seconds) do |req| - req.ip if paths_to_be_protected.include?(req.path) && req.post? + +unless Rails.env.test? + Rack::Attack.throttle('protected paths', limit: 6, period: 60.seconds) do |req| + req.ip if paths_to_be_protected.include?(req.path) && req.post? + end end -- libgit2 0.21.2