added ifttt ip address to whitelist

This commit is contained in:
Martin Donnelly 2018-06-14 11:33:17 +01:00
parent a713884980
commit e8ea83136c

View File

@ -32,13 +32,12 @@ const ips = ['212.71.255.44', '82.35.75.161', '54.146.189.113', '52.90.194.191']
// 54.146.189.113, 52.90.194.191 is for ifttt
const complexUrls = new Map();
app.use(ipfilter(ips, { 'mode': 'allow' }));
app.use((err, req, res, _next) => {
const thisErr = Object.assign({},err);
const thisErr = Object.assign({}, err);
thisErr.originalUrl = req.originalUrl;
console.error('Error handler', thisErr);
@ -126,6 +125,9 @@ function getUrl (req, res) {
return;
}
if (theUrl !== firstUrl)
logger.info(`>>> Using ${theUrl} instead of ${firstUrl}`);
const options = urlparser.parse(theUrl);
options.followAllRedirects = true;
options.headers = {