From db5d7857c8d4dd4340d43a74fdd08177df843663 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 2 Apr 2024 15:15:43 +0200 Subject: [PATCH] fix: warning if you use multiple domains for a service --- app/Livewire/Project/Service/ServiceApplicationView.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Project/Service/ServiceApplicationView.php b/app/Livewire/Project/Service/ServiceApplicationView.php index 0b3a4cef6..70a8662d5 100644 --- a/app/Livewire/Project/Service/ServiceApplicationView.php +++ b/app/Livewire/Project/Service/ServiceApplicationView.php @@ -59,7 +59,11 @@ class ServiceApplicationView extends Component $this->validate(); $this->application->save(); updateCompose($this->application); - $this->dispatch('success', 'Service saved.'); + if (str($this->application->fqdn)->contains(',')) { + $this->dispatch('warning', 'Some services do not support multiple domains, which can lead to problems and is NOT RECOMMENDED.'); + } else { + $this->dispatch('success', 'Service saved.'); + } } catch (\Throwable $e) { return handleError($e, $this); } finally {