mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Commands;
|
||||
use App\Client\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
use React\EventLoop\LoopInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class ShareCommand extends ServerAwareCommand
|
||||
{
|
||||
@@ -15,6 +16,7 @@ class ShareCommand extends ServerAwareCommand
|
||||
public function handle()
|
||||
{
|
||||
$auth = $this->option('auth') ?? config('expose.auth_token', '');
|
||||
$this->info('Using auth token: '.$auth, OutputInterface::VERBOSITY_DEBUG);
|
||||
|
||||
if (strstr($this->argument('host'), 'host.docker.internal')) {
|
||||
config(['expose.dns' => true]);
|
||||
@@ -36,12 +38,12 @@ class ShareCommand extends ServerAwareCommand
|
||||
|
||||
if (! is_null($this->option('subdomain'))) {
|
||||
$subdomains = explode(',', $this->option('subdomain'));
|
||||
$this->info('Trying to use custom domain: '.$subdomains[0]);
|
||||
$this->info('Trying to use custom domain: '.$subdomains[0].PHP_EOL, OutputInterface::VERBOSITY_VERBOSE);
|
||||
} else {
|
||||
$host = Str::beforeLast($this->argument('host'), '.');
|
||||
$host = Str::beforeLast($host, ':');
|
||||
$subdomains = [Str::slug($host)];
|
||||
$this->info('Trying to use custom domain: '.$subdomains[0].PHP_EOL);
|
||||
$this->info('Trying to use custom domain: '.$subdomains[0].PHP_EOL, OutputInterface::VERBOSITY_VERBOSE);
|
||||
}
|
||||
|
||||
(new Factory())
|
||||
|
||||
Reference in New Issue
Block a user