From 7a6c48d93439ae64e73014ce55f787658c2e022b Mon Sep 17 00:00:00 2001 From: Herobrine-ymf Date: Thu, 23 Mar 2023 16:02:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E8=BE=BE=E5=88=B0?= =?UTF-8?q?=E9=99=90=E5=88=B6=E6=97=B6=E7=9A=84=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/src/middleware/limiter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/src/middleware/limiter.ts b/service/src/middleware/limiter.ts index d4df149395..606e035a7d 100644 --- a/service/src/middleware/limiter.ts +++ b/service/src/middleware/limiter.ts @@ -10,9 +10,9 @@ const maxCount = (isNotEmptyString(MAX_REQUEST_PER_HOUR) && !isNaN(Number(MAX_RE const limiter = rateLimit({ windowMs: 60 * 60 * 1000, // Maximum number of accesses within an hour max: maxCount, - statusCode: 200, // 200 means success,but the message is 'Too many request from this IP in 1 hour' + statusCode: 200, // 200 means success,but the message is '一小时内的请求次数太多了!请过段时间再试' message: async (req, res) => { - res.send({ status: 'Fail', message: 'Too many request from this IP in 1 hour', data: null }) + res.send({ status: 'Fail', message: '一小时内的请求次数太多了!请过段时间再试', data: null }) }, })