15 lines
389 B
TypeScript
15 lines
389 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
// 컨테이너에서는 서비스명(http://backend:30101)으로, 로컬에서는 localhost로 붙는다
|
|
const API = process.env.API_ORIGIN ?? "http://localhost:30101";
|
|
|
|
const nextConfig: NextConfig = {
|
|
async rewrites() {
|
|
return [
|
|
{ source: "/api/:path*", destination: `${API}/api/:path*` },
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|