refactor(server): simplify proxy path logic and remove unnecessary conditions
This commit is contained in:
@@ -486,20 +486,14 @@ $schema://$host {
|
||||
$base_path = config('constants.coolify.base_config_path');
|
||||
$proxyType = $this->proxyType();
|
||||
$proxy_path = "$base_path/proxy";
|
||||
// TODO: should use /traefik for already existing configurations?
|
||||
// Should move everything except /caddy and /nginx to /traefik
|
||||
// The code needs to be modified as well, so maybe it does not worth it
|
||||
|
||||
if ($proxyType === ProxyTypes::TRAEFIK->value) {
|
||||
// Do nothing
|
||||
$proxy_path = '/';
|
||||
} elseif ($proxyType === ProxyTypes::CADDY->value) {
|
||||
$proxy_path = $proxy_path.'/caddy';
|
||||
} elseif ($proxyType === ProxyTypes::NGINX->value) {
|
||||
if (isDev()) {
|
||||
$proxy_path = '/var/lib/docker/volumes/coolify_dev_coolify_data/_data/proxy/nginx';
|
||||
} else {
|
||||
$proxy_path = $proxy_path.'/nginx';
|
||||
}
|
||||
}
|
||||
|
||||
return $proxy_path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user