ipv6 bs
This commit is contained in:
parent
8a9fb95c06
commit
9884007a98
@ -47,6 +47,9 @@ io.sockets.on('connection', function (socket) {
|
||||
let userip = socket.handshake.headers['x-real-ip'] || socket.handshake.headers['x-forwarded-for'] ||
|
||||
socket.request.connection._peername.address || "127.0.0.1";
|
||||
|
||||
if(userip.indexOf('::ffff:') == 0)
|
||||
userip = userip.substring(7);
|
||||
|
||||
if(config.server.debug)
|
||||
console.log('clientID: '+socket.id+' from: ', userip);
|
||||
|
||||
|
Reference in New Issue
Block a user