fix: generate sentinel url

This commit is contained in:
Andras Bacsai
2024-10-15 15:43:53 +02:00
parent 73923a0207
commit 46ec8eed64
7 changed files with 33 additions and 4 deletions

View File

@@ -527,6 +527,22 @@ $schema://$host {
Storage::disk('ssh-mux')->delete($this->muxFilename());
}
public function generateSentinelUrl() {
if ($this->isLocalhost()) {
return 'http://host.docker.internal:8888';
}
$settings = InstanceSettings::get();
if ($settings->fqdn) {
return $settings->fqdn;
}
if ($settings->ipv4) {
return $settings->ipv4 . ':8888';
}
if ($settings->ipv6) {
return $settings->ipv6 . ':8888';
}
return null;
}
public function generateSentinelToken()
{
$data = [