Skip to content

Commit

Permalink
feat: disable rewrites for production build
Browse files Browse the repository at this point in the history
  • Loading branch information
sukjuhong committed Jan 13, 2025
1 parent d1da70f commit 30b52f6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ const nextConfig = {
},
// 리프레시 토큰을 요청에 실어서 보내기 위함. 도메인이 달라서 안 실어짐
rewrites() {
return [
{
source: "/api/:path*",
destination: `${BASE_URL}/:path*`,
},
];
return process.env.NODE_ENV === "production"
? []
: [
{
source: "/api/:path*",
destination: `${BASE_URL}/api/:path*`,
},
];
},
};

Expand Down

0 comments on commit 30b52f6

Please sign in to comment.