0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Updated rate limiter window name

This commit is contained in:
Víctor Losada Hernández
2024-05-25 20:51:44 +02:00
parent 748c25aae4
commit 6e0aff525f

View File

@@ -7,11 +7,12 @@ const rateLimit = require('express-rate-limit');
// Define rate limiter options
const loginLimiter = rateLimit({
windowMs: 24 * 60 * 60 * 1000, // 24 hours window
max: 10, // limit each IP to 10 requests per windowMs
timeWindow: 24 * 60 * 60 * 1000, // 24 hours window
max: 10, // limit each IP to 10 requests per timeWindow
message: "Too many login attempts from this IP, please try again later"
});
//Local version username and password
process.env.ADMIN_USER = process.env.ADMIN_USER || 'admin';
process.env.ADMIN_PASS = process.env.ADMIN_PASS || 'password3';