log blocked ip addresses request url
This commit is contained in:
parent
8745bf887f
commit
d6fc2c9632
@ -38,19 +38,14 @@ app.use((err, req, res, _next) => {
|
||||
const thisErr = Object.assign({},err);
|
||||
thisErr.originalUrl = req.originalUrl;
|
||||
|
||||
console.log('Error handler', thisErr);
|
||||
console.log(req);
|
||||
console.error('Error handler', thisErr);
|
||||
|
||||
if(thisErr instanceof IpDeniedError)
|
||||
res.status(401);
|
||||
|
||||
else
|
||||
res.status(thisErr.status || 500);
|
||||
|
||||
/* res.render('error', {
|
||||
'message': 'You shall not pass',
|
||||
'error': err
|
||||
});*/
|
||||
|
||||
res.status(403).end();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user