Skip to content

Commit

Permalink
Target "experimental-serverless-trace" and add CORS headers for API …
Browse files Browse the repository at this point in the history
…routes. (generated by blackbox.ai )
  • Loading branch information
saiyamdubey committed Feb 13, 2024
1 parent f65e9b7 commit 40571f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// Other Next.js configuration options...

target: "experimental-serverless-trace",
async headers() {
return [
{
source: '/api/:path*',
source: "/api/:path*",
headers: [
{ key: "Access-Control-Allow-Credentials", value: "true" },
{ key: "Access-Control-Allow-Origin", value: "*" },
Expand All @@ -22,4 +24,4 @@ const nextConfig = {
},
};

export default nextConfig;
export default nextConfig;

0 comments on commit 40571f2

Please sign in to comment.