Repository Public MIT
1import { env } from "@/lib/env";2import { searchIndexJson } from "@/lib/search-index";34export const dynamic = "force-dynamic";56/** The search corpus, built from what the visitor may see and rebuilt whenever a publication changes it. */7export async function GET() {8 return new Response(await searchIndexJson(), { headers: { "Content-Type": "application/json; charset=utf-8", "Cache-Control": env.mode === "preview" ? "no-store" : "public, max-age=0, must-revalidate" } });9}10