fix: Application not loading after setting RACK_ATTACK_LIMIT ENV variable [CW-2587] (#8044)

This commit is contained in:
Mazen Khalil
2023-10-04 13:26:20 +03:00
committed by GitHub
parent b71a580573
commit 5c9ab21617
2 changed files with 2 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ class Rack::Attack
#
# Key: "rack::attack:#{Time.now.to_i/:period}:req/ip:#{req.ip}"
throttle('req/ip', limit: ENV.fetch('RACK_ATTACK_LIMIT', 3000), period: 1.minute, &:ip)
throttle('req/ip', limit: ENV.fetch('RACK_ATTACK_LIMIT', '3000').to_i, period: 1.minute, &:ip)
###-----------------------------------------------###
###-----Authentication Related Throttling---------###