From 0913e72f4f67c7c9843da03f65fe27a8dd5dff1f Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Mon, 27 Apr 2020 11:07:19 +0200 Subject: [PATCH] wip --- app/Client/Client.php | 2 +- app/Client/ProxyManager.php | 2 +- app/Server/Factory.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Client/Client.php b/app/Client/Client.php index 69479b4..bd73031 100644 --- a/app/Client/Client.php +++ b/app/Client/Client.php @@ -43,7 +43,7 @@ class Client $protocol = $this->configuration->port() === 443 ? "wss" : "ws"; - connect($protocol."://{$this->configuration->host()}:{$this->configuration->port()}/__expose_control__?authToken={$token}", [], [ + connect($protocol."://{$this->configuration->host()}:{$this->configuration->port()}/expose/control?authToken={$token}", [], [ 'X-Expose-Control' => 'enabled', ], $this->loop) ->then(function (WebSocket $clientConnection) use ($sharedUrl, $subdomain) { diff --git a/app/Client/ProxyManager.php b/app/Client/ProxyManager.php index d291f2c..4553144 100644 --- a/app/Client/ProxyManager.php +++ b/app/Client/ProxyManager.php @@ -26,7 +26,7 @@ class ProxyManager { $protocol = $this->configuration->port() === 443 ? "wss" : "ws"; - connect($protocol."://{$this->configuration->host()}:{$this->configuration->port()}/__expose_control__", [], [ + connect($protocol."://{$this->configuration->host()}:{$this->configuration->port()}/expose/control", [], [ 'X-Expose-Control' => 'enabled', ], $this->loop) ->then(function (WebSocket $proxyConnection) use ($clientId, $connectionData) { diff --git a/app/Server/Factory.php b/app/Server/Factory.php index 4456a0b..e7414d6 100644 --- a/app/Server/Factory.php +++ b/app/Server/Factory.php @@ -84,7 +84,7 @@ class Factory protected function addExposeRoutes() { - $this->router->get('/__expose_control__', ControlMessageController::class); + $this->router->get('/expose/control', ControlMessageController::class, 'request.headers.get("x-expose-control") matches "/enabled/i"'); $this->router->addSymfonyRoute('tunnel', new Route('/{__catchall__}', [