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

@@ -47,5 +47,12 @@ module.exports = {
code: err.code||"unexpected_error",
message: err.message||err.toString()
});
},
getRequestLogObject: function(req) {
return {
user: req.user,
path: req.path,
ip: (req.headers && req.headers['x-forwarded-for']) || (req.connection && req.connection.remoteAddress) || undefined
}
}
}