diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 8b2d2f876..7b8cfbfd1 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -92,6 +92,7 @@ class ProjectController extends Controller $generatedValue = $value; if ($value->contains('SERVICE_')) { $command = $value->after('SERVICE_')->beforeLast('_'); + // TODO: make it shared with Service.php switch ($command->value()) { case 'PASSWORD': $generatedValue = Str::password(symbols: false); diff --git a/app/Http/Livewire/Project/Application/Preview/Form.php b/app/Http/Livewire/Project/Application/Preview/Form.php index f831b487d..fb71e5e47 100644 --- a/app/Http/Livewire/Project/Application/Preview/Form.php +++ b/app/Http/Livewire/Project/Application/Preview/Form.php @@ -29,7 +29,8 @@ class Form extends Component public function generate_real_url() { if (data_get($this->application, 'fqdn')) { - $url = Url::fromString($this->application->fqdn); + $firstFqdn = Str::of($this->application->fqdn)->before(','); + $url = Url::fromString($firstFqdn); $host = $url->getHost(); $this->preview_url_template = Str::of($this->application->preview_url_template)->replace('{{domain}}', $host); }