From a9699eb254f66e836f35347953b09fe156f963f4 Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Fri, 5 Mar 2021 09:14:03 +0100 Subject: [PATCH] Use config auth when sharing TCP ports --- app/Commands/SharePortCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Commands/SharePortCommand.php b/app/Commands/SharePortCommand.php index b05e068..40509c3 100644 --- a/app/Commands/SharePortCommand.php +++ b/app/Commands/SharePortCommand.php @@ -27,11 +27,13 @@ class SharePortCommand extends Command { $this->configureConnectionLogger(); + $auth = $this->option('auth') ?? config('expose.auth_token', ''); + (new Factory()) ->setLoop(app(LoopInterface::class)) ->setHost(config('expose.host', 'localhost')) ->setPort(config('expose.port', 8080)) - ->setAuth($this->option('auth')) + ->setAuth($auth) ->createClient() ->sharePort($this->argument('port')) ->createHttpServer()