Change rate limit for media proxy

pull/22919/head
老周部落 2023-01-03 18:55:47 +08:00 committed by GitHub
parent 41fe7576bf
commit 82acc07ceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ class Rack::Attack
req.authenticated_user_id if req.post? && req.path.match?(/\A\/api\/v\d+\/media\z/i)
end
throttle('throttle_media_proxy', limit: 30, period: 10.minutes) do |req|
throttle('throttle_media_proxy', limit: 300, period: 5.minutes) do |req|
req.throttleable_remote_ip if req.path.start_with?('/media_proxy')
end