Add isLocalhost method to Server model and

conditionally show Cloudflare Tunnel checkbox in
server form view
This commit is contained in:
Andras Bacsai
2023-11-16 14:28:26 +01:00
parent 81437e6822
commit fb42c43953
2 changed files with 13 additions and 5 deletions

View File

@@ -112,6 +112,12 @@ class Server extends BaseModel
return $this->proxy->modelScope();
}
public function isLocalhost() {
if (isDev()) {
return $this->ip === 'coolify-testing-host';
}
return $this->ip === 'host.docker.internal';
}
public function checkServerRediness()
{
$serverUptimeCheckNumber = $this->unreachable_count;