Attempt of ip for socket

This commit is contained in:
Thomas FORGIONE 2015-07-07 16:25:58 +02:00
parent af008e53e4
commit 91e1d14e35
1 changed files with 2 additions and 2 deletions

View File

@ -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
);
};