From 7666cec462075854f0719274b42e6a90b1c5a90b Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 5 Feb 2025 21:10:37 +0100 Subject: [PATCH] fix(ssl): wrong ssl cert is loaded to the server and UI error when regenerating SSL --- app/Livewire/Server/Advanced.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Server/Advanced.php b/app/Livewire/Server/Advanced.php index 4390d691e..04d45620e 100644 --- a/app/Livewire/Server/Advanced.php +++ b/app/Livewire/Server/Advanced.php @@ -80,6 +80,8 @@ class Advanced extends Component $this->caCertificate->ssl_certificate = $this->certificateContent; $this->caCertificate->save(); + $this->loadCaCertificate(); + $this->writeCertificateToServer(); dispatch(new RegenerateSslCertJob( @@ -103,6 +105,8 @@ class Advanced extends Component validityDays: 15 * 365 ); + $this->loadCaCertificate(); + $this->writeCertificateToServer(); dispatch(new RegenerateSslCertJob( @@ -126,7 +130,7 @@ class Advanced extends Component "chown -R 9999:root $caCertPath", "chmod -R 700 $caCertPath", "rm -f $caCertPath/coolify-ca.crt", - "echo '{$this->caCertificate->ssl_certificate}' > $caCertPath/coolify-ca.crt", + "echo '{$this->certificateContent}' > $caCertPath/coolify-ca.crt", "chmod 644 $caCertPath/coolify-ca.crt", ]);