Refactor StartSentinel to ensure endpoint uses HTTPS
This commit is contained in:
parent
bea492165f
commit
740419806e
1 changed files with 2 additions and 4 deletions
|
|
@ -21,14 +21,12 @@ public function handle(Server $server, $version = 'next', bool $restart = false)
|
|||
$endpoint = InstanceSettings::get()->fqdn;
|
||||
if (isDev()) {
|
||||
$endpoint = 'http://host.docker.internal:8000';
|
||||
} else {
|
||||
if (str($endpoint)->startsWith('http')) {
|
||||
throw new \Exception('You should use https to run Sentinel.');
|
||||
}
|
||||
}
|
||||
if (! $endpoint) {
|
||||
throw new \Exception('You should set FQDN in Instance Settings.');
|
||||
}
|
||||
// Ensure the endpoint is using HTTPS
|
||||
$endpoint = str($endpoint)->replace('http://', 'https://')->value();
|
||||
$environments = [
|
||||
'TOKEN' => $token,
|
||||
'ENDPOINT' => $endpoint,
|
||||
|
|
|
|||
Loading…
Reference in a new issue