From 9f40886c45f15bfbfc757fdfebb2ee25b0363c69 Mon Sep 17 00:00:00 2001 From: xxqfamous Date: Thu, 8 Jun 2023 13:58:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82=E9=99=90?= =?UTF-8?q?=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index be17a4370..d29d6d798 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1172,7 +1172,7 @@ class ApplicationController < ActionController::Base else record_count = 1 end - tip_exception("非法请求") if record_count > 100 + normal_status("请求太快,请稍后再试。") if record_count > 100 Rails.cache.write("request/#{controller_name}/#{Time.now.strftime('%Y%m%d%H%M')}/#{request.remote_ip}", record_count, expires_in: 1.minute) rescue