Add isLocalhost method to Server model and

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

No files matched your search

+6
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;