This commit is contained in:
hashbro
2026-08-24 07:19:10 +08:00
parent cd07fe62fd
commit 2c11a46f17
4 changed files with 60 additions and 4 deletions
+5
View File
@@ -115,6 +115,11 @@ Artisan::command('ds:build {--host=} {--port=} {--origin=}', function () {
$host = trim((string) $this->option('host'));
$port = trim((string) $this->option('port'));
$origin = trim((string) $this->option('origin'));
if ($origin === '' && $host === '') {
$origin = rtrim((string) config('app.url'), '/');
$this->warn('未传 --origin,使用 APP_URL: '.$origin);
$this->warn('线上必须显式指定 C2,例如: php artisan ds:build --origin https://你的域名');
}
if ($origin !== '') {
$args[] = '--origin';
$args[] = $origin;