Use config auth when sharing TCP ports

This commit is contained in:
Marcel Pociot
2021-03-05 09:14:03 +01:00
parent e2e9edf769
commit a9699eb254

View File

@@ -27,11 +27,13 @@ class SharePortCommand extends Command
{ {
$this->configureConnectionLogger(); $this->configureConnectionLogger();
$auth = $this->option('auth') ?? config('expose.auth_token', '');
(new Factory()) (new Factory())
->setLoop(app(LoopInterface::class)) ->setLoop(app(LoopInterface::class))
->setHost(config('expose.host', 'localhost')) ->setHost(config('expose.host', 'localhost'))
->setPort(config('expose.port', 8080)) ->setPort(config('expose.port', 8080))
->setAuth($this->option('auth')) ->setAuth($auth)
->createClient() ->createClient()
->sharePort($this->argument('port')) ->sharePort($this->argument('port'))
->createHttpServer() ->createHttpServer()