mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 19:53:19 +08:00
Fix Rack::Attack deprication message [SCI-10623]
This commit is contained in:
parent
7e966837d2
commit
b29ebc4005
1 changed files with 2 additions and 2 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue