chore: Increase the rate limit for contact search (#9256)
This commit is contained in:
@@ -149,7 +149,7 @@ class Rack::Attack
|
|||||||
end
|
end
|
||||||
|
|
||||||
## Prevent abuse of contact search api
|
## Prevent abuse of contact search api
|
||||||
throttle('/api/v1/accounts/:account_id/contacts/search', limit: 5, period: 1.minute) do |req|
|
throttle('/api/v1/accounts/:account_id/contacts/search', limit: ENV.fetch('RATE_LIMIT_CONTACT_SEARCH', '100').to_i, period: 1.minute) do |req|
|
||||||
match_data = %r{/api/v1/accounts/(?<account_id>\d+)/contacts/search}.match(req.path)
|
match_data = %r{/api/v1/accounts/(?<account_id>\d+)/contacts/search}.match(req.path)
|
||||||
match_data[:account_id] if match_data.present?
|
match_data[:account_id] if match_data.present?
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user