Added DB checks to tests and fixed getIP using the wrong config

This commit is contained in:
Ajay Ramachandran
2020-04-06 17:25:20 -04:00
parent 67c608e76f
commit 8eca458e38
4 changed files with 58 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
var fs = require('fs');
var config = JSON.parse(fs.readFileSync('config.json'));
var config = require('./config.js');
module.exports = function getIP(req) {
return config.behindProxy ? req.headers['x-forwarded-for'] : req.connection.remoteAddress;