allow more media proxy requests when logged in

staging
multiple creatures 2019-08-04 02:24:03 -05:00
parent 4e3d546f61
commit 9ba2081720
1 changed files with 6 additions and 2 deletions

View File

@ -65,8 +65,12 @@ class Rack::Attack
req.authenticated_user_id if req.post? && req.path.start_with?('/api/v1/media')
end
throttle('throttle_media_proxy', limit: 30, period: 30.minutes) do |req|
req.remote_ip if req.path.start_with?('/media_proxy')
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_unauthenticated_media_proxy', limit: 30, period: 30.minutes) do |req|
req.remote_ip if req.unauthenticated? && req.path.start_with?('/media_proxy')
end
throttle('throttle_api_sign_up', limit: 5, period: 30.minutes) do |req|