Update revalidate paths again

This commit is contained in:
Henrik Larsson 2023-07-07 14:05:26 +02:00
parent c02df1b3ee
commit 04082124f3

View File

@ -8,6 +8,10 @@ const SANITY_WEBHOOK_SECRET = `${process.env.SANITY_WEBHOOK_SECRET}`;
export async function POST(request: NextRequest) {
// Await the response from our request.
const requestData = await request.json();
const path = request.nextUrl.searchParams.get('path') || '/'
console.log(`===== Path: ${path}`)
// Get headers.
const headersList = headers();