mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 04:03:45 +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\/})
|
request.ip if request.path.match?(%r{^\/api\/})
|
||||||
end
|
end
|
||||||
|
|
||||||
Rack::Attack.throttled_response = lambda do |env|
|
Rack::Attack.throttled_responder = lambda do |request|
|
||||||
match_data = env['rack.attack.match_data']
|
match_data = request.env['rack.attack.match_data']
|
||||||
now = match_data[:epoch_time]
|
now = match_data[:epoch_time]
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
|
|
Loading…
Reference in a new issue