From ea61d3acd6a416471f3fc5ca5e4ee5da0bf01612 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Mon, 10 Jan 2022 22:25:24 +0900 Subject: Fix media API limit (#17272) --- 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 2a6cca7dc..964d4266d 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -55,7 +55,7 @@ class Rack::Attack end throttle('throttle_api_media', limit: 30, period: 30.minutes) do |req| - req.authenticated_user_id if req.post? && req.path.start_with?('/api/v1/media') + req.authenticated_user_id if req.post? && req.path.match?('^/api/v\d+/media') end throttle('throttle_media_proxy', limit: 30, period: 10.minutes) do |req| -- cgit