diff options
author | Cheng-Han, Wu | 2016-03-15 10:54:04 +0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-03-15 10:54:04 +0800 |
commit | c5f6c2bab399c4e4694a26663cd8e5e31ce8350b (patch) | |
tree | b2698159a3bd031dabe3ed875f2bae411639abf4 | |
parent | 218761d6a1bee821ea2caa3390fca95827c21e09 (diff) |
Updated to handle user address when server behind other services
Diffstat (limited to '')
-rw-r--r-- | lib/realtime.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/realtime.js b/lib/realtime.js index 67a73e5d..081d401e 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, |