Attempt of ip for socket
This commit is contained in:
parent
af008e53e4
commit
91e1d14e35
|
@ -44,7 +44,7 @@ Log.socket = {};
|
|||
Log.socket.connection = function(socket) {
|
||||
log(
|
||||
'[SOK] ' + new Date() + ' ' +
|
||||
socket.request.connection._peername.address + ' connection',
|
||||
(socket.handshake.headers['x-forwarded-for'] || socket.handshake.address) + ' connection',
|
||||
Colors.MAGENTA
|
||||
);
|
||||
};
|
||||
|
@ -52,7 +52,7 @@ Log.socket.connection = function(socket) {
|
|||
Log.socket.disconnect = function(socket) {
|
||||
log(
|
||||
'[SOK] ' + new Date() + ' ' +
|
||||
socket.request.connection._peername.address + ' disconnect',
|
||||
(socket.handshake.headers['x-forwarded-for'] || socket.handshake.address) + ' disconnect',
|
||||
Colors.MAGENTA
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue