From 82acc07ceb275c983552084f461ffb4f4d40a199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= <31075951+laozhoubuluo@users.noreply.github.com> Date: Tue, 3 Jan 2023 18:55:47 +0800 Subject: [PATCH] Change rate limit for media proxy --- config/initializers/rack_attack.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 72ef7ba8019..7ec00ac7516 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -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