fix: disable cloudflare tunnel on "localhost"

This commit is contained in:
Andras Bacsai
2024-11-08 14:03:26 +01:00
parent 2f63c773dc
commit 373e715e8d
3 changed files with 9 additions and 5 deletions

View File

@@ -17,6 +17,9 @@ class CloudflareTunnels extends Component
{
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid($server_uuid)->firstOrFail();
if ($this->server->isLocalhost()) {
return redirect()->route('server.show', ['server_uuid' => $server_uuid]);
}
$this->isCloudflareTunnelsEnabled = $this->server->settings->is_cloudflare_tunnel;
} catch (\Throwable $e) {
return handleError($e, $this);