added ifttt ip address to whitelist
This commit is contained in:
parent
d6fc2c9632
commit
84742640c4
11
server.js
11
server.js
@ -28,7 +28,10 @@ const cache = apicache.middleware;
|
|||||||
|
|
||||||
// app.use(cache('15 minutes'));
|
// app.use(cache('15 minutes'));
|
||||||
|
|
||||||
const ips = ['212.71.255.44', '82.35.75.161'];
|
const ips = ['212.71.255.44', '82.35.75.161', '54.146.189.113'];
|
||||||
|
|
||||||
|
// 54.146.189.113 is for ifttt
|
||||||
|
|
||||||
|
|
||||||
const complexUrls = new Map();
|
const complexUrls = new Map();
|
||||||
|
|
||||||
@ -156,11 +159,11 @@ function getUrl (req, res) {
|
|||||||
logger.debug(response.headers);
|
logger.debug(response.headers);
|
||||||
|
|
||||||
const tempUrl = new URL(theUrl);
|
const tempUrl = new URL(theUrl);
|
||||||
logger.debug('theUrl:', theUrl);
|
// logger.debug('theUrl:', theUrl);
|
||||||
logger.debug('tempurl:', tempUrl);
|
// logger.debug('tempurl:', tempUrl);
|
||||||
|
|
||||||
rUrl = new URL(response.headers.location, tempUrl.origin);
|
rUrl = new URL(response.headers.location, tempUrl.origin);
|
||||||
logger.debug(rUrl);
|
logger.debug(rUrl.href);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rUrl = urlparser.parse(response.headers.location);
|
rUrl = urlparser.parse(response.headers.location);
|
||||||
|
Loading…
Reference in New Issue
Block a user