This commit is contained in:
BIG2EYEZ
2024-01-28 00:09:22 +08:00
parent 6190cb63cd
commit 548064782e
5 changed files with 19 additions and 43 deletions

View File

@ -4,6 +4,10 @@ const limiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 5, // limit each IP to 5 requests per windowMs
message: 'Too many login attempts from this IP, please try again later.',
standardHeaders: "draft-7", // draft-6: `RateLimit-*` headers; draft-7: combined `RateLimit` header
legacyHeaders: false, // Disable the `X-RateLimit-*` headers.
});
module.exports = limiter;