From 38383a38d92fa66f48eff522b6c57512f7421adb Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Fri, 5 Jun 2020 15:55:36 +0200 Subject: [PATCH] wip --- app/Commands/ServeCommand.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Commands/ServeCommand.php b/app/Commands/ServeCommand.php index 7d33c3c..4b7a57b 100644 --- a/app/Commands/ServeCommand.php +++ b/app/Commands/ServeCommand.php @@ -21,12 +21,18 @@ class ServeCommand extends Command $this->info("Expose server running on port ".$this->option('port')."."); }); + $validateAuthTokens = config('expose.server.validate_auth_tokens'); + + if ($this->option('validateAuthTokens')) { + $validateAuthTokens = true; + } + (new Factory()) ->setLoop($loop) ->setHost($this->argument('host')) ->setPort($this->option('port')) ->setHostname($this->argument('hostname')) - ->validateAuthTokens($this->option('validateAuthTokens')) + ->validateAuthTokens($validateAuthTokens) ->createServer() ->run(); }