mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 01:44:45 +02:00
Add back force https (#726)
This commit is contained in:
parent
d2d960ecf3
commit
ad9447e974
@ -16,7 +16,9 @@ use Illuminate\Foundation\Application;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
use SocialiteProviders\Discord\Provider;
|
||||
use SocialiteProviders\Manager\SocialiteWasCalled;
|
||||
@ -28,6 +30,11 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(Application $app): void
|
||||
{
|
||||
// If the APP_URL value is set with https:// make sure we force it here. Theoretically
|
||||
// this should just work with the proxy logic, but there are a lot of cases where it
|
||||
// doesn't, and it triggers a lot of support requests, so lets just head it off here.
|
||||
URL::forceHttps(Str::startsWith(config('app.url') ?? '', 'https://'));
|
||||
|
||||
Relation::enforceMorphMap([
|
||||
'allocation' => Models\Allocation::class,
|
||||
'api_key' => Models\ApiKey::class,
|
||||
|
Loading…
x
Reference in New Issue
Block a user