diff --git a/next-enterprise/expirator-service/index.ts b/next-enterprise/expirator-service/index.ts index f2185538..8a30c75c 100644 --- a/next-enterprise/expirator-service/index.ts +++ b/next-enterprise/expirator-service/index.ts @@ -23,7 +23,7 @@ await new Promise((resolve, reject) => { for (const tag of event.tags) { url.searchParams.append('tag', tag) } - fetch(url, {method: 'POST'}) + fetch(url) .then((res) => { if (!res.ok) { throw new TypeError('Failed', {cause: res.statusText}) diff --git a/next-enterprise/src/app/api/expire-tags/route.ts b/next-enterprise/src/app/api/expire-tags/route.ts index eb9cd89c..5d7ee428 100644 --- a/next-enterprise/src/app/api/expire-tags/route.ts +++ b/next-enterprise/src/app/api/expire-tags/route.ts @@ -1,6 +1,6 @@ import {expireTag} from 'next/cache' -export async function POST(request: Request) { +export async function GET(request: Request) { const url = new URL(request.url) const secret = url.searchParams.get('secret') if (secret !== process.env.SECRET) {