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(ui): incorrect caddy proxy config file path on proxy page (#6722)

Andras Bacsai83f9fd8e204c
diff --cc app/Livewire/Server/Proxy.php
index c92f73f170,9b345181c5..49d8722104
--- a/app/Livewire/Server/Proxy.php
+++ b/app/Livewire/Server/Proxy.php
@@@ -50,49 -41,11 +50,49 @@@ class Proxy extends Componen
$this->selectedProxy = $this->server->proxyType();
$this->redirectEnabled = data_get($this->server, 'proxy.redirect_enabled', true);
$this->redirectUrl = data_get($this->server, 'proxy.redirect_url');
+ $this->syncData(false);
+ }
+
+ private function syncData(bool $toModel = false): void
+ {
+ if ($toModel) {
+ $this->server->settings->generate_exact_labels = $this->generateExactLabels;
+ } else {
+ $this->generateExactLabels = $this->server->settings->generate_exact_labels ?? false;
+ }
+ }
+
+ /**
+ * Get Traefik versions from cached data with in-memory optimization.
+ * Returns array like: ['v3.5' => '3.5.6', 'v3.6' => '3.6.2']
+ *
+ * This method adds an in-memory cache layer on top of the global
+ * get_traefik_versions() helper to avoid multiple calls during
+ * a single component lifecycle/render.
+ */
+ protected function getTraefikVersions(): ?array
+ {
+ // In-memory cache for this component instance (per-request)
+ if ($this->cachedVersionsFile !== null) {
+ return data_get($this->cachedVersionsFile, 'traefik');
+ }
+
+ // Load from global cached helper (Redis + filesystem)
+ $versionsData = get_versions_data();
+ $this->cachedVersionsFile = $versionsData;
+
+ if (! $versionsData) {
+ return null;
+ }
+
+ $traefikVersions = data_get($versionsData, 'traefik');
+
+ return is_array($traefikVersions) ? $traefikVersions : null;
}
- public function getConfigurationFilePathProperty()
+ public function getConfigurationFilePathProperty(): string
{
- return $this->server->proxyPath().'docker-compose.yml';
+ return rtrim($this->server->proxyPath(), '/') . '/docker-compose.yml';
}
public function changeProxy()