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 d18a488 commit a4c3e6eCopy full SHA for a4c3e6e
config/initializers/rack_attack.rb
@@ -49,8 +49,10 @@ class Rack::Attack
49
# Throttle all requests by IP (60rpm)
50
#
51
# Key: "rack::attack:#{Time.now.to_i/:period}:req/ip:#{req.ip}"
52
+ EXEMPT_PATHS = ['/assets', '/api/v1/points', '/api/v1/cases'].freeze
53
+
54
throttle('req/ip', limit: 50, period: 1.minute) do |req|
- req.ip # unless req.path.start_with?('/assets')
55
+ req.ip unless EXEMPT_PATHS.any? { |path| req.path.start_with?(path) }
56
end
57
58
# Throttle POST requests to */services by IP address
0 commit comments