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:
Emi Matchu 2024-01-24 03:26:52 -08:00
parent 5004142dfb
commit 1933046809

View file

@ -12,7 +12,7 @@ Rack::Attack.throttled_responder = lambda do |req|
if req.path.end_with?('.json')
[503, {}, [PETS_THROTTLE_MESSAGE]]
else
flash = req.flash
flash = req.env['action_dispatch.request.flash_hash']
flash[:warning] = PETS_THROTTLE_MESSAGE
[302, {"Location" => "/"}, [PETS_THROTTLE_MESSAGE]]
end