try to get ip from x-forwarded-for first

v1.18.x
barisusakli 10 years ago
parent d65546a34d
commit 92c869e886

@ -40,7 +40,7 @@ Sockets.init = function(server) {
};
function onConnection(socket) {
socket.ip = socket.request.connection.remoteAddress;
socket.ip = socket.request.headers['x-forwarded-for'] || socket.request.connection.remoteAddress;
logger.io_one(socket, socket.uid);

Loading…
Cancel
Save