54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const domain = process.env.NEXT_PUBLIC_PROXY_HOST || "http://localhost:3000";
|
|
const subDomain = process.env.NEXT_PUBLIC_SUB_DOMAIN || "http://localhost:13000";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
experimental: {
|
|
proxyTimeout: 600000, // 10분 (밀리초 단위)
|
|
},
|
|
async rewrites() {
|
|
return {
|
|
beforeFiles: [
|
|
{
|
|
source: "/_next/static/:path*",
|
|
destination: `${subDomain}/_next/static/:path*`,
|
|
has: [
|
|
{
|
|
type: "header",
|
|
key: "referer",
|
|
value: "(.*)/cms(.*)",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
afterFiles: [
|
|
{
|
|
source: "/sewerage-service/:path*",
|
|
destination: `${domain}/sewerage-service/:path*`,
|
|
},
|
|
{
|
|
source: "/reuse-service/:path*",
|
|
destination: `${domain}/reuse-service/:path*`,
|
|
},
|
|
{
|
|
source: "/operation-service/:path*",
|
|
destination: `${domain}/operation-service/:path*`,
|
|
},
|
|
{
|
|
source: "/ngii-server/:path*",
|
|
destination: `${domain}/ngii-server/:path*`,
|
|
},
|
|
{
|
|
source: "/cms/:path*",
|
|
destination: `${subDomain}/cms/:path*`,
|
|
},
|
|
],
|
|
fallback: [],
|
|
};
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|