added ip filter

This commit is contained in:
Martin Donnelly 2018-06-13 23:16:48 +01:00
parent e17fb1524e
commit 61b4a9f422

View File

@ -107,7 +107,6 @@ const bouncer = ['phpmyadmin',
function getUrl (req, res) {
const theUrl = req.params.encoded_id;
logger.info(`IP:${req.ip}`);
logger.debug('Want', theUrl);
if (theUrl === undefined || bouncer.indexOf(theUrl) !== -1 || theUrl === '') {
logger.warn(`You're not getting in ${theUrl}`);
@ -169,7 +168,7 @@ function getUrl (req, res) {
urlQuery(a => {
// logger.info(a);
logger.info('Got result');
logger.info(`Got result for ${theUrl}`);
// res.setHeader('Content-Type', 'application/json');
res.send(a);
});