Pass client version to server

This commit is contained in:
Marcel Pociot
2021-06-16 21:00:13 +02:00
parent 1d97d63d2b
commit c9cb29ed35
3 changed files with 8 additions and 2 deletions

View File

@@ -77,9 +77,11 @@ class Client
$deferred = new Deferred();
$promise = $deferred->promise();
$exposeVersion = config('app.version');
$wsProtocol = $this->configuration->port() === 443 ? 'wss' : 'ws';
connect($wsProtocol."://{$this->configuration->host()}:{$this->configuration->port()}/expose/control?authToken={$authToken}", [], [
connect($wsProtocol."://{$this->configuration->host()}:{$this->configuration->port()}/expose/control?authToken={$authToken}&version={$exposeVersion}", [], [
'X-Expose-Control' => 'enabled',
], $this->loop)
->then(function (WebSocket $clientConnection) use ($sharedUrl, $subdomain, $serverHost, $deferred, $authToken) {