withRouting( web: __DIR__ . '/../routes/domains.php', commands: __DIR__ . '/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { // Trust all proxies (for Traefik/Docker setup) $middleware->trustProxies( at: '*', headers: \Illuminate\Http\Request::HEADER_X_FORWARDED_FOR | \Illuminate\Http\Request::HEADER_X_FORWARDED_HOST | \Illuminate\Http\Request::HEADER_X_FORWARDED_PORT | \Illuminate\Http\Request::HEADER_X_FORWARDED_PROTO ); }) ->withExceptions(function (Exceptions $exceptions) { // })->create();