Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: prevent instance fqdn persisting to other servers dynamic proxy configs

Koby Wood52d78413347d
diff --git a/app/Models/Server.php b/app/Models/Server.php
index ea487fee76..58bd1c5355 100644
--- a/app/Models/Server.php
+++ b/app/Models/Server.php
@@ -238,7 +238,7 @@ respond 404
$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 @@ respond 404
}
} 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);