Get IP from HTTP headers
This commit is contained in:
parent
8f2c968403
commit
35ff89faa2
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ class Connection {
|
||||||
this.connections = net.connections;
|
this.connections = net.connections;
|
||||||
this.io = net.io;
|
this.io = net.io;
|
||||||
this.socket = socket;
|
this.socket = socket;
|
||||||
this.ip = socket.request.connection.remoteAddress;
|
this.ip = socket.request.headers['x-real-ip'] ?? socket.request.connection.remoteAddress;
|
||||||
|
|
||||||
this.player = new Player(this);
|
this.player = new Player(this);
|
||||||
this._room = false;
|
this._room = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue