화면관리 삭제기능구현
This commit is contained in:
@@ -19,10 +19,13 @@ const nextConfig = {
|
||||
},
|
||||
|
||||
async rewrites() {
|
||||
// 개발 환경과 운영 환경에 따른 백엔드 URL 설정
|
||||
const backendUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : "http://backend:8080";
|
||||
|
||||
return [
|
||||
{
|
||||
source: "/api/:path*",
|
||||
destination: "http://backend:8080/api/:path*",
|
||||
destination: `${backendUrl}/api/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
@@ -43,7 +46,8 @@ const nextConfig = {
|
||||
|
||||
// 환경 변수 (런타임에 읽기)
|
||||
env: {
|
||||
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || "http://39.117.244.52:8080/api",
|
||||
// 개발 환경에서는 Next.js rewrites를 통해 /api로 프록시
|
||||
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || "/api",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user