Try to fix the pet load limiter
This is hard to test directly, but this is my guess from what I'm reading in this? https://stackoverflow.com/a/32958124/107415
This commit is contained in:
parent
5004142dfb
commit
1933046809
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ Rack::Attack.throttled_responder = lambda do |req|
|
||||||
if req.path.end_with?('.json')
|
if req.path.end_with?('.json')
|
||||||
[503, {}, [PETS_THROTTLE_MESSAGE]]
|
[503, {}, [PETS_THROTTLE_MESSAGE]]
|
||||||
else
|
else
|
||||||
flash = req.flash
|
flash = req.env['action_dispatch.request.flash_hash']
|
||||||
flash[:warning] = PETS_THROTTLE_MESSAGE
|
flash[:warning] = PETS_THROTTLE_MESSAGE
|
||||||
[302, {"Location" => "/"}, [PETS_THROTTLE_MESSAGE]]
|
[302, {"Location" => "/"}, [PETS_THROTTLE_MESSAGE]]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue