diff --git a/pages/api/data.ts b/pages/api/data.ts index ba52661..fd7fe1e 100644 --- a/pages/api/data.ts +++ b/pages/api/data.ts @@ -15,6 +15,9 @@ export default async function handler(req: NextRequest): Promise { status: 500, headers: { 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Methods': 'GET, OPTIONS', + 'Access-Control-Allow-Headers': 'Content-Type', }, }) } @@ -42,6 +45,9 @@ export default async function handler(req: NextRequest): Promise { return new Response(JSON.stringify(ret), { headers: { 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Methods': 'GET, OPTIONS', + 'Access-Control-Allow-Headers': 'Content-Type', }, }) }