Skip to content

Commit

Permalink
fix: cors issue
Browse files Browse the repository at this point in the history
  • Loading branch information
adeherysh committed Mar 19, 2024
1 parent bf85745 commit 73092e6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ const nextConfig = {
output: 'standalone',
swcMinify: true,
reactStrictMode: true,
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "Access-Control-Allow-Origin",
value: "*",
// value: process.env.ALLOWED_ORIGIN,
},
{
key: "Access-Control-Allow-Methods",
value: "GET, POST, PATCH, PUT, DELETE, OPTIONS",
// value: process.env.ALLOWED_METHOD,
},
{
key: "Access-Control-Allow-Headers",
value: "*",
// value: process.env.ALLOWED_HEADERS,
},
],
},
];
},
};

export default nextConfig;

0 comments on commit 73092e6

Please sign in to comment.