From a83a3e78fca2c9e43a986aa8007c2aef4f6dd613 Mon Sep 17 00:00:00 2001 From: Z Date: Mon, 28 Oct 2019 16:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BE=E5=AE=BD=E4=BA=86api=E9=A2=91?= =?UTF-8?q?=E7=8E=87=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 273cac9ca..12bfb498b 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -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