proper error page

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

No files matched your search

+3 -3
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