Skip to content

Commit

Permalink
fix: fix analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushSehrawat committed Sep 7, 2024
1 parent 166ed8a commit e8a9bbd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ const config = {
},
],
},
headers: async () => {
return [
{
// mathching all API routes
source: "/api/:path*",
headers: [
{ key: "Access-Control-Allow-Credentials", value: "true" },
{ key: "Access-Control-Allow-Origin", value: "*" },
{
key: "Access-Control-Allow-Methods",
value: "GET,OPTIONS,PATCH,DELETE,POST,PUT",
},
{
key: "Access-Control-Allow-Headers",
value: "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version",
},
],
},
];
},
};

export default withMDX(config);
Expand Down

0 comments on commit e8a9bbd

Please sign in to comment.