This commit is contained in:
Andras Bacsai
2024-10-17 22:08:23 +02:00
parent 9044c655b8
commit b75c2dc604
18 changed files with 62 additions and 51 deletions

View File

@@ -72,7 +72,7 @@ class ServerSetting extends Model
}
}
} catch (\Throwable $e) {
loggy('Error creating server setting: ' . $e->getMessage());
loggy('Error creating server setting: '.$e->getMessage());
}
});
}
@@ -98,17 +98,18 @@ class ServerSetting extends Model
$settings = InstanceSettings::get();
if ($this->server->isLocalhost()) {
$domain = 'http://host.docker.internal:8000';
} else if ($settings->fqdn) {
} elseif ($settings->fqdn) {
$domain = $settings->fqdn;
} else if ($settings->ipv4) {
$domain = $settings->ipv4 . ':8000';
} else if ($settings->ipv6) {
$domain = $settings->ipv6 . ':8000';
} elseif ($settings->ipv4) {
$domain = $settings->ipv4.':8000';
} elseif ($settings->ipv6) {
$domain = $settings->ipv6.':8000';
}
$this->sentinel_custom_url = $domain;
if ($save) {
$this->save();
}
return $domain;
}