forked from mirrors/catstodon
Make deleting / unboosting slightly less strict as well
This commit is contained in:
parent
c40b063bd4
commit
92ff7b0e3e
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ class Rack::Attack
|
||||||
API_DELETE_REBLOG_REGEX = /\A\/api\/v1\/statuses\/[\d]+\/unreblog/.freeze
|
API_DELETE_REBLOG_REGEX = /\A\/api\/v1\/statuses\/[\d]+\/unreblog/.freeze
|
||||||
API_DELETE_STATUS_REGEX = /\A\/api\/v1\/statuses\/[\d]+/.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))
|
req.authenticated_user_id if (req.post? && req.path.match?(API_DELETE_REBLOG_REGEX)) || (req.delete? && req.path.match?(API_DELETE_STATUS_REGEX))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue