Skip to content

Commit

Permalink
add cors
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Jan 10, 2025
1 parent 15f44b3 commit d309e07
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/app/api/events/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,16 @@ export const POST = async (req: NextRequest) => {
.catch();
});

return NextResponse.json({
success: true,
});
return NextResponse.json(
{
success: true,
},
{
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
"Access-Control-Allow-Headers": "Content-Type, Authorization, x-od-id",
},
}
);
};

0 comments on commit d309e07

Please sign in to comment.