0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

proper error page

This commit is contained in:
Víctor Losada Hernández
2024-06-16 17:06:18 +02:00
parent 6e0aff525f
commit f15c831b70
5 changed files with 24 additions and 14 deletions

View File

@@ -7,9 +7,9 @@ const rateLimit = require('express-rate-limit');
// Define rate limiter options
const loginLimiter = rateLimit({
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"
timeWindow : 24 * 60 * 60 * 1000, // 24 hours window
max : 10, // limit each IP to 10 requests per timeWindow
handler : ()=>{throw { HBErrorCode: '470', code: 470, message: 'Too many failed login attempts, try again later' }; }
});
//Local version username and password