log failed login attempts

This commit is contained in:
IrosTheBeggar 2020-10-20 04:10:57 -04:00
parent 8262a1726c
commit 7e688a3527

View File

@ -94,6 +94,8 @@ exports.setup = function (mstream, program) {
// Failed Login Attempt
mstream.get('/login-failed', (req, res) => {
winston.warn(`Failed login attempt from ${req.ip}`);
// Wait before sending the response
setTimeout(() => { res.status(401).json({ error: 'Try Again' }); }, 800);
});