mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	feat: Update rack attack IP limit (#7866)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
		| @@ -199,6 +199,8 @@ ANDROID_SHA256_CERT_FINGERPRINT=AC:73:8E:DE:EB:56:EA:CC:10:87:02:A7:65:37:7B:38: | ||||
| ## Rack Attack configuration | ||||
| ## To prevent and throttle abusive requests | ||||
| # ENABLE_RACK_ATTACK=true | ||||
| # RACK_ATTACK_IP_LIMIT=3000 | ||||
| # ENABLE_RACK_ATTACK_WIDGET_API=true | ||||
|  | ||||
| ## Running chatwoot as an API only server | ||||
| ## setting this value to true will disable the frontend dashboard endpoints | ||||
|   | ||||
| @@ -46,7 +46,7 @@ class Rack::Attack | ||||
|   # | ||||
|   # Key: "rack::attack:#{Time.now.to_i/:period}:req/ip:#{req.ip}" | ||||
|  | ||||
|   throttle('req/ip', limit: 300, period: 1.minute, &:ip) | ||||
|   throttle('req/ip', limit: ENV.fetch('RACK_ATTACK_LIMIT', 3000), period: 1.minute, &:ip) | ||||
|  | ||||
|   ###-----------------------------------------------### | ||||
|   ###-----Authentication Related Throttling---------### | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mishra
					Shivam Mishra