Files
MineGeo/app/api/v1/[...path]/route.ts

16 lines
586 B
TypeScript

import { NextRequest } from "next/server";
import { handle } from "@/lib/api";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export const maxDuration = 300;
async function route(
request: NextRequest,
{ params }: { params: Promise<{ path: string[] }> },
) {
const response = await handle(request, (await params).path);
// Includes private drafts, pairing credentials, token creation and errors.
response.headers.set("Cache-Control", "private, no-store");
return response;
}
export { route as GET, route as POST, route as PATCH, route as DELETE };