From 23d5ada3b889e8220ee0fa55975a0e9b11fd115e Mon Sep 17 00:00:00 2001
From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Date: Tue, 10 Jun 2025 11:47:29 +0200
Subject: [PATCH] fix(cloudflare): update refresh method to correctly set
Cloudflare tunnel status and improve user notification on IP address update
---
app/Livewire/Server/CloudflareTunnel.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/Livewire/Server/CloudflareTunnel.php b/app/Livewire/Server/CloudflareTunnel.php
index 0407aa0e4..b2ffa003f 100644
--- a/app/Livewire/Server/CloudflareTunnel.php
+++ b/app/Livewire/Server/CloudflareTunnel.php
@@ -31,7 +31,8 @@ class CloudflareTunnel extends Component
public function refresh()
{
- $this->mount($this->server->uuid);
+ $this->server->refresh();
+ $this->isCloudflareTunnelsEnabled = $this->server->settings->is_cloudflare_tunnel;
}
public function mount(string $server_uuid)
@@ -58,7 +59,7 @@ class CloudflareTunnel extends Component
$this->server->update(['ip' => $this->server->ip_previous]);
$this->dispatch('success', 'Cloudflare Tunnel disabled.
Manually updated the server IP address to its previous IP address.');
} else {
- $this->dispatch('success', 'Cloudflare Tunnel disabled. Please update the server IP address to its real IP address in the server settings.');
+ $this->dispatch('warning', 'Cloudflare Tunnel disabled. Action required: Update the server IP address to its real IP address in the Advanced settings.');
}
} catch (\Throwable $e) {
return handleError($e, $this);