mirror of https://github.com/mastodon/mastodon
Merge f7bca3546f
into 1959365c2f
This commit is contained in:
commit
53bb52f6c3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue