withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware): void { // L'application est servie derrière un reverse proxy (Nginx Proxy Manager) // qui termine le TLS : on lui fait confiance pour détecter HTTPS, // l'IP réelle du client et le bon schéma d'URL. $middleware->trustProxies(at: '*'); // En-têtes de sécurité HTTP appliqués à toutes les réponses. $middleware->append(SecurityHeaders::class); }) ->withExceptions(function (Exceptions $exceptions): void { // })->create();