This commit is contained in:
Mia Heidenstedt 2024-05-10 20:06:51 +00:00 committed by GitHub
commit 53bb52f6c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -82,6 +82,10 @@ class Rack::Attack
req.authenticated_user_id if req.post? && req.path.match?(%r{\A/api/v\d+/media\z}i)
end
throttle('throttle_authenticated_media_proxy', limit: 100, period: 5.minutes) do |req|
req.authenticated_user_id if req.path.start_with?('/media_proxy')
end
throttle('throttle_media_proxy', limit: 30, period: 10.minutes) do |req|
req.throttleable_remote_ip if req.path.start_with?('/media_proxy')
end