import { resolveInRoots } from "@/lib/paths"; import { serveFile } from "@/lib/range"; export const dynamic = "force-dynamic"; // The bench's media, by root-relative path. // // The Range/206 body lives in lib/range.ts, which the blind bench also serves // through -- see that file for why 206 is load-bearing rather than polite. export async function GET(request: Request) { const url = new URL(request.url); const abs = resolveInRoots(url.searchParams.get("path")); if (!abs) return new Response("path is not inside a known root", { status: 400 }); return serveFile(abs, request); }