diff --git a/bootstrap/app.php b/bootstrap/app.php index 4b327d2..139dc23 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -13,7 +13,14 @@ return Application::configure(basePath: dirname(__DIR__)) health: '/up', ) ->withMiddleware(function (Middleware $middleware): void { - // + $middleware->trustProxies( + at: env('TRUSTED_PROXIES', '127.0.0.1'), + headers: Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_HOST | + Request::HEADER_X_FORWARDED_PORT | + Request::HEADER_X_FORWARDED_PROTO | + Request::HEADER_X_FORWARDED_AWS_ELB, + ); }) ->withExceptions(function (Exceptions $exceptions): void { $exceptions->shouldRenderJsonWhen(