mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	fix: Application not loading after setting RACK_ATTACK_LIMIT ENV variable [CW-2587] (#8044)
This commit is contained in:
		| @@ -199,7 +199,7 @@ ANDROID_SHA256_CERT_FINGERPRINT=AC:73:8E:DE:EB:56:EA:CC:10:87:02:A7:65:37:7B:38: | |||||||
| ## Rack Attack configuration | ## Rack Attack configuration | ||||||
| ## To prevent and throttle abusive requests | ## To prevent and throttle abusive requests | ||||||
| # ENABLE_RACK_ATTACK=true | # ENABLE_RACK_ATTACK=true | ||||||
| # RACK_ATTACK_IP_LIMIT=3000 | # RACK_ATTACK_LIMIT=300 | ||||||
| # ENABLE_RACK_ATTACK_WIDGET_API=true | # ENABLE_RACK_ATTACK_WIDGET_API=true | ||||||
|  |  | ||||||
| ## Running chatwoot as an API only server | ## Running chatwoot as an API only server | ||||||
|   | |||||||
| @@ -46,7 +46,7 @@ class Rack::Attack | |||||||
|   # |   # | ||||||
|   # Key: "rack::attack:#{Time.now.to_i/:period}:req/ip:#{req.ip}" |   # 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---------### |   ###-----Authentication Related Throttling---------### | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Mazen Khalil
					Mazen Khalil