pick up correct ip
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ function add(action, req, data, callback) {
|
||||
callback = callback || NOOP_CALLBACK;
|
||||
|
||||
var id = uuid.v4();
|
||||
var source = { ip: req.ip || null, username: req.user ? req.user.username : null };
|
||||
var source = { ip: req.headers['x-forwarded-for'] || req.ip || null, username: req.user ? req.user.username : null };
|
||||
|
||||
eventlogdb.add(id, action, source, data, function (error) {
|
||||
if (error) return callback(new EventLogError(EventLogError.INTERNAL_ERROR, error));
|
||||
|
||||
Reference in New Issue
Block a user