From 92ff7b0e3e274857b66d92d11b1934d8f5f77c2a Mon Sep 17 00:00:00 2001 From: Jeremy Kescher Date: Sat, 12 Nov 2022 14:43:21 +0100 Subject: [PATCH] Make deleting / unboosting slightly less strict as well --- config/initializers/rack_attack.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 3fb22c6321..456c575cb3 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -77,7 +77,7 @@ class Rack::Attack API_DELETE_REBLOG_REGEX = /\A\/api\/v1\/statuses\/[\d]+\/unreblog/.freeze API_DELETE_STATUS_REGEX = /\A\/api\/v1\/statuses\/[\d]+/.freeze - throttle('throttle_api_delete', limit: 30, period: 5.minutes) do |req| + throttle('throttle_api_delete', limit: 60, period: 5.minutes) do |req| req.authenticated_user_id if (req.post? && req.path.match?(API_DELETE_REBLOG_REGEX)) || (req.delete? && req.path.match?(API_DELETE_STATUS_REGEX)) end