diff options
author | Jeong Arm <kjwonmail@gmail.com> | 2022-01-10 22:25:24 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-10 14:25:24 +0100 |
commit | ea61d3acd6a416471f3fc5ca5e4ee5da0bf01612 (patch) | |
tree | eaadfd03a1642beb3f6c9a256468c7bd73ed548a | |
parent | bc7a8ae6d6d2c2118e5c49add83539498b9d543b (diff) |
Fix media API limit (#17272)
-rw-r--r-- | config/initializers/rack_attack.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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| |