From c5f6c2bab399c4e4694a26663cd8e5e31ce8350b Mon Sep 17 00:00:00 2001 From: "Cheng-Han, Wu" Date: Tue, 15 Mar 2016 10:54:04 +0800 Subject: [PATCH] Updated to handle user address when server behind other services --- lib/realtime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/realtime.js b/lib/realtime.js index 67a73e5..081d401 100644 --- a/lib/realtime.js +++ b/lib/realtime.js @@ -632,7 +632,7 @@ function connection(socket) { //create user data users[socket.id] = { id: socket.id, - address: socket.handshake.address, + address: socket.handshake.headers['x-forwarded-for'] || socket.handshake.address, 'user-agent': socket.handshake.headers['user-agent'], color: color, cursor: null,