1
0
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-07-01 20:09:23 +00:00

Update batch rate limiter in rateLimiter.js to allow 10 operations per minute instead of 5, enhancing throughput for bulk operations.

This commit is contained in:
SunWuyuan 2025-05-11 13:50:22 +08:00
parent 810491fd2f
commit 69887f9c47
No known key found for this signature in database
GPG Key ID: A6A54CF66F56BB64

View File

@ -73,8 +73,8 @@ export const authLimiter = rateLimit({
// 批量操作限速器(比写操作更严格)
export const batchLimiter = rateLimit({
windowMs: 5 * 60 * 1000, // 5分钟
limit: 5, // 每个IP在windowMs时间内最多允许5个批量操作
windowMs: 1 * 60 * 1000, // 5分钟
limit: 10, // 每个IP在windowMs时间内最多允许5个批量操作
standardHeaders: "draft-7",
legacyHeaders: false,
message: "批量操作请求过于频繁,请稍后再试",