From 45b244d30954fd583edad2c3de561f6862ca8020 Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Wed, 30 Apr 2025 15:01:23 +0900 Subject: [PATCH] chore: Refactor next.config.ts to streamline API rewrites and remove unnecessary CORS headers --- next.config.ts | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/next.config.ts b/next.config.ts index 8304bcd..1ff5ba6 100644 --- a/next.config.ts +++ b/next.config.ts @@ -7,31 +7,10 @@ const nextConfig: NextConfig = { includePaths: [path.join(__dirname, './src/styles')], }, async rewrites() { - return [ - { - source: '/:path*', - destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`, - }, - ] - }, - async headers() { return [ { source: '/api/:path*', - headers: [ - { - key: 'Access-Control-Allow-Origin', - value: '*', - }, - { - key: 'Access-Control-Allow-Methods', - value: 'GET, POST, PUT, DELETE, OPTIONS', - }, - { - key: 'Access-Control-Allow-Headers', - value: 'Content-Type, Authorization', - }, - ], + destination: `${process.env.NEXT_PUBLIC_API_URL}/api/:path*`, }, ] },