mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 02:42:43 +00:00
Updated rate limiter window name
This commit is contained in:
@@ -7,11 +7,12 @@ const rateLimit = require('express-rate-limit');
|
|||||||
|
|
||||||
// Define rate limiter options
|
// Define rate limiter options
|
||||||
const loginLimiter = rateLimit({
|
const loginLimiter = rateLimit({
|
||||||
windowMs: 24 * 60 * 60 * 1000, // 24 hours window
|
timeWindow: 24 * 60 * 60 * 1000, // 24 hours window
|
||||||
max: 10, // limit each IP to 10 requests per windowMs
|
max: 10, // limit each IP to 10 requests per timeWindow
|
||||||
message: "Too many login attempts from this IP, please try again later"
|
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_USER = process.env.ADMIN_USER || 'admin';
|
||||||
process.env.ADMIN_PASS = process.env.ADMIN_PASS || 'password3';
|
process.env.ADMIN_PASS = process.env.ADMIN_PASS || 'password3';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user