Add req back to audit log events and extend to Projects api

This commit is contained in:
Nick O'Leary
2019-08-09 16:56:11 +01:00
parent 6032d096ec
commit be2dd6dc32
13 changed files with 249 additions and 114 deletions

View File

@@ -214,7 +214,7 @@ var log = module.exports = {
if (req) {
msg.user = req.user;
msg.path = req.path;
msg.ip = (req.headers && req.headers['x-forwarded-for']) || (req.connection && req.connection.remoteAddress) || undefined;
msg.ip = req.ip || (req.headers && req.headers['x-forwarded-for']) || (req.connection && req.connection.remoteAddress) || undefined;
}
log.log(msg);
}