This commit is contained in:
Andras Bacsai 2023-05-26 12:35:39 +02:00
parent 1d2c4fc553
commit b85a0c4d09

View File

@ -25,9 +25,13 @@ public function register(): void
public function boot(): void
{
if ($this->app->environment('production')) {
$settings = InstanceSettings::first();
if (Str::startsWith($settings->fqdn, 'https')) {
URL::forceScheme('https');
try {
$settings = InstanceSettings::first();
if (Str::startsWith($settings->fqdn, 'https')) {
URL::forceScheme('https');
}
} catch (\Exception $e) {
// do nothing
}
}
}