From d6fc2c9632d497ae58fcd91f9a51ee3f2c107b92 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Thu, 14 Jun 2018 01:04:05 +0100 Subject: [PATCH] log blocked ip addresses request url --- server.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/server.js b/server.js index 60a09c5..9ab05b0 100644 --- a/server.js +++ b/server.js @@ -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(); });