mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
Update SocketIORouter.js
Changed the setting of client.remoteAddress
This commit is contained in:
parent
f0f98b41fe
commit
6ea5efbcc3
1 changed files with 6 additions and 1 deletions
|
@ -55,7 +55,12 @@ exports.setSocketIO = function(_socket)
|
|||
|
||||
socket.sockets.on('connection', function(client)
|
||||
{
|
||||
client.set('remoteAddress', client.handshake.address.address);
|
||||
if(client.handshake.headers['x-forwarded-for'] === undefined){
|
||||
client.set('remoteAddress', client.handshake.address.address);
|
||||
}
|
||||
else{
|
||||
client.set('remoteAddress', client.handshake.headers['x-forwarded-for']);
|
||||
}
|
||||
var clientAuthorized = false;
|
||||
|
||||
//wrap the original send function to log the messages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue