silverwolf-x's picture
download
raw
509 Bytes
import { NextRequest, NextResponse } from "next/server";
import { revalidateTag } from "next/cache";
export async function POST(request: NextRequest) {
const requestHeaders = new Headers(request.headers);
const secret = requestHeaders.get("x-vercel-reval-key");
if (secret !== process.env.CONTENTFUL_REVALIDATE_SECRET) {
return NextResponse.json({ message: "Invalid secret" }, { status: 401 });
}
revalidateTag("posts");
return NextResponse.json({ revalidated: true, now: Date.now() });
}

Xet Storage Details

Size:
509 Bytes
·
Xet hash:
bbecb1cb82ec6bf967bf4fa1df5d3f75c4e7d6d18b1abaea3a236dc8ff3336bb

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.