a little error handling
This commit is contained in:
parent
e38257ece5
commit
53874d91f0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user