Merge pull request #2760 from KobyW/next

fix: prevent instance fqdn persisting to other servers dynamic proxy config
This commit is contained in:
Andras Bacsai 2024-07-11 11:19:29 +02:00 committed by GitHub
commit 22a7d85e58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -322,7 +322,7 @@ public function setupDynamicProxyConfiguration()
$dynamic_config_path = $this->proxyPath().'/dynamic'; $dynamic_config_path = $this->proxyPath().'/dynamic';
if ($this->proxyType() === 'TRAEFIK_V2') { if ($this->proxyType() === 'TRAEFIK_V2') {
$file = "$dynamic_config_path/coolify.yaml"; $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([ instant_remote_process([
"rm -f $file", "rm -f $file",
], $this); ], $this);
@ -428,7 +428,7 @@ public function setupDynamicProxyConfiguration()
} }
} elseif ($this->proxyType() === 'CADDY') { } elseif ($this->proxyType() === 'CADDY') {
$file = "$dynamic_config_path/coolify.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([ instant_remote_process([
"rm -f $file", "rm -f $file",
], $this); ], $this);