Browse Source

放宽了api频率限制

pull/4/head
欧醚 5 years ago
parent
commit
a83a3e78fc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      config/initializers/rack_attack.rb

+ 1
- 1
config/initializers/rack_attack.rb View File

@ -53,7 +53,7 @@ class Rack::Attack
req.remote_ip == '127.0.0.1' || req.remote_ip == '::1'
end
throttle('throttle_authenticated_api', limit: 300, period: 5.minutes) do |req|
throttle('throttle_authenticated_api', limit: 300, period: 2.minutes) do |req|
req.authenticated_user_id if req.api_request?
end

Loading…
Cancel
Save