Browse Source

放宽了非认证api频率限制

pull/4/head
欧醚 5 years ago
parent
commit
062308c006
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

@ -57,7 +57,7 @@ class Rack::Attack
req.authenticated_user_id if req.api_request?
end
throttle('throttle_unauthenticated_api', limit: 300, period: 5.minutes) do |req|
throttle('throttle_unauthenticated_api', limit: 300, period: 2.minutes) do |req|
req.remote_ip if req.api_request? && req.unauthenticated?
end

Loading…
Cancel
Save