From 79e5dc44dc05e37504a30330d8cb60f723ccfea6 Mon Sep 17 00:00:00 2001 From: Yuanzhe Liu <294068487@qq.com> Date: Fri, 29 Dec 2023 12:30:23 +0800 Subject: [PATCH] Update danmaku.js --- routes/danmaku.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/danmaku.js b/routes/danmaku.js index 79d22ca..898d3ed 100644 --- a/routes/danmaku.js +++ b/routes/danmaku.js @@ -17,8 +17,8 @@ const rateLimit = require('express-rate-limit'); // 访问频率限制 const allowlist = ['::1', '::ffff:127.0.0.1']; const apiLimiter = rateLimit({ - windowMs: 5 * 60 * 1000, // 5 minute - max: 10, // limit each IP to 10 requests per windowMs + windowMs: 24 * 60 * 60 * 1000, // 1 days + max: 1000, // limit each IP to 1000 requests per windowMs message: 'Too many requests from this IP, please try again later', standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers skipFailedRequests: true, // Don't count failed requests (status >= 400)