enabled() || $request->user('web') !== null || ! in_array($request->method(), ['GET', 'HEAD'], true)) { return $next($request); } $path = '/'.$request->path(); if ($request->path() === '/') { return redirect('/dashboard'); } if (! isset(PublicNavigation::PAGES[$path])) { return $next($request); } $response = Inertia::render(PublicNavigation::PAGES[$path], $navigation->props($request))->toResponse($request); $response->headers->set('Cache-Control', 'private, no-store, max-age=0'); $response->headers->set('X-Robots-Tag', 'noindex, nofollow'); return $response; } }