diff --git a/.gitignore b/.gitignore index d23d9c1..97ce421 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /node_modules bun.lock .env +.vscode/settings.json diff --git a/src/routes/[id].ts b/src/routes/[id].ts index 94b5ab5..599a9c1 100644 --- a/src/routes/[id].ts +++ b/src/routes/[id].ts @@ -90,6 +90,18 @@ async function handler(request: ExtendedRequest): Promise { return Response.json({ status: 200, badges, + }, { + status: 200, + headers: { + "Cache-Control": "public, max-age=60", + "Content-Type": "application/json", + "Access-Control-Allow-Origin": "*", + "Access-Control-Allow-Methods": "GET, OPTIONS", + "Access-Control-Allow-Headers": "Content-Type", + "Access-Control-Max-Age": "86400", + "Access-Control-Allow-Credentials": "true", + "Access-Control-Expose-Headers": "Content-Type", + }, }); }