The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Add options request to metadata api
Justin Parkerce92afec956f
diff --git a/pages/api/edge/metatags.ts b/pages/api/edge/metatags.tsindex 3964c23399..d75cdb7428 100644--- a/pages/api/edge/metatags.ts+++ b/pages/api/edge/metatags.ts@@ -38,6 +38,14 @@ export default async function handler(req: NextRequest, ev: NextFetchEvent) {"Access-Control-Allow-Origin": "*",},});+ } else if (req.method === "OPTIONS") {+ return new Response(null, {+ status: 204,+ headers: {+ "Access-Control-Allow-Origin": "*",+ "Access-Control-Allow-Methods": "GET, OPTIONS",+ },+ });} else {return new Response(`Method ${req.method} Not Allowed`, { status: 405 });}