From 52d78413347dc0c7822e16ce65ff07e71ed32a99 Mon Sep 17 00:00:00 2001 From: Koby Wood Date: Sat, 6 Jul 2024 19:33:11 -0400 Subject: [PATCH] fix: prevent instance fqdn persisting to other servers dynamic proxy configs fixes: 2650 --- app/Models/Server.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Server.php b/app/Models/Server.php index ea487fee7..58bd1c535 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -238,7 +238,7 @@ public function setupDynamicProxyConfiguration() $dynamic_config_path = $this->proxyPath().'/dynamic'; if ($this->proxyType() === 'TRAEFIK_V2') { $file = "$dynamic_config_path/coolify.yaml"; - if (empty($settings->fqdn) || (isCloud() && $this->id !== 0)) { + if (empty($settings->fqdn) || (isCloud() && $this->id !== 0) || !$this->isLocalhost()) { instant_remote_process([ "rm -f $file", ], $this); @@ -344,7 +344,7 @@ public function setupDynamicProxyConfiguration() } } elseif ($this->proxyType() === 'CADDY') { $file = "$dynamic_config_path/coolify.caddy"; - if (empty($settings->fqdn) || (isCloud() && $this->id !== 0)) { + if (empty($settings->fqdn) || (isCloud() && $this->id !== 0) || !$this->isLocalhost()) { instant_remote_process([ "rm -f $file", ], $this);