mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
log failed login attempts
This commit is contained in:
parent
8262a1726c
commit
7e688a3527
@ -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);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user