hosp_2025/bootstrap/app.php

27 lines
884 B
PHP
Raw Normal View History

2025-12-11 15:10:26 -04:00
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Request;
2025-12-11 15:10:26 -04:00
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
$middleware->trustProxies(
at: '*', // or ['127.0.0.1', '::1'] / your proxy IP(s)
headers: Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO
);;
2025-12-11 15:10:26 -04:00
})
->withExceptions(function (Exceptions $exceptions): void {
//
})->create();