I added remoteAddress to connection
This commit is contained in:
parent
4e17888f0e
commit
6992feb2e7
|
|
@ -45,6 +45,15 @@ class Handler implements MessageComponentInterface
|
||||||
return $connection->close();
|
return $connection->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set IP to connection
|
||||||
|
$connection->remoteAddress = trim(
|
||||||
|
explode(
|
||||||
|
',',
|
||||||
|
$connection->httpRequest->getHeaderLine('X-Forwarded-For')
|
||||||
|
)[0] ?? $connection->remoteAddress
|
||||||
|
);
|
||||||
|
Log::channel('websocket')->info('WS onOpen IP: ' . $connection->remoteAddress);
|
||||||
|
|
||||||
$this->verifyAppKey($connection);
|
$this->verifyAppKey($connection);
|
||||||
$this->verifyOrigin($connection);
|
$this->verifyOrigin($connection);
|
||||||
$this->limitConcurrentConnections($connection);
|
$this->limitConcurrentConnections($connection);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue