fix cors
Some checks failed
Code quality checks / biome (push) Failing after 9s

This commit is contained in:
creations 2025-04-19 12:49:54 -04:00
parent cfbcaa4851
commit 71a527f345
Signed by: creations
GPG key ID: 8F553AA4320FC711
2 changed files with 13 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/node_modules
bun.lock
.env
.vscode/settings.json

View file

@ -90,6 +90,18 @@ async function handler(request: ExtendedRequest): Promise<Response> {
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",
},
});
}