From 40571f23630e6a070610949dcd5f172378d18338 Mon Sep 17 00:00:00 2001 From: saiyamdubey Date: Tue, 13 Feb 2024 20:51:05 +0530 Subject: [PATCH] Target "experimental-serverless-trace" and add CORS headers for API routes. (generated by blackbox.ai ) --- next.config.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 3e12770..7f93a0d 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -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: "*" }, @@ -22,4 +24,4 @@ const nextConfig = { }, }; -export default nextConfig; +export default nextConfig; \ No newline at end of file