log blocked ip addresses request url

This commit is contained in:
Martin Donnelly 2018-06-14 01:04:05 +01:00
parent 8745bf887f
commit d6fc2c9632

View File

@ -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();
});