From 53874d91f0923bb564eb2aac2075d411de4f9216 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Wed, 13 Jun 2018 23:59:46 +0100 Subject: [PATCH] a little error handling --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index dced39e..a4d13af 100644 --- a/server.js +++ b/server.js @@ -29,7 +29,7 @@ const cache = apicache.middleware; const ips = ['212.71.255.44', '82.35.75.161']; -// app.use(ipfilter(ips, { 'mode': 'allow' })); +app.use(ipfilter(ips, { 'mode': 'allow' })); app.use((err, req, res, _next) => { console.log('Error handler', err); @@ -145,6 +145,7 @@ function getUrl (req, res) { logger.debug(response.headers); const tempUrl = URL.parse(theUrl); + logger.debug('tempurl:', tempUrl); const newURL = `${tempUrl.origin}${response.headers.location}`; logger.debug('newURL', newURL); rUrl = URL.parse(newURL);