Fix Rack::Attack deprication message [SCI-10623]

This commit is contained in:
sboursen-scinote 2024-04-16 10:11:08 +02:00
parent 7e966837d2
commit b29ebc4005

View file

@ -10,8 +10,8 @@ Rack::Attack.throttle('api requests by ip',
request.ip if request.path.match?(%r{^\/api\/})
end
Rack::Attack.throttled_response = lambda do |env|
match_data = env['rack.attack.match_data']
Rack::Attack.throttled_responder = lambda do |request|
match_data = request.env['rack.attack.match_data']
now = match_data[:epoch_time]
headers = {