32 lines
726 B
PHP
32 lines
726 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Support\Facades\URL;
|
|
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
// Forcer HTTPS absolument en production (peu importe le proxy)
|
|
if (!app()->environment('local')) {
|
|
URL::forceScheme('https');
|
|
// Accepter les headers du reverse proxy
|
|
SymfonyRequest::setTrustedProxies(['*'], -1);
|
|
}
|
|
}
|
|
}
|