Files
ai-contract-platform/frontend/next.config.ts
T
2026-04-30 22:42:10 +08:00

19 lines
409 B
TypeScript

import type { NextConfig } from "next";
const backendBaseUrl =
process.env.BACKEND_BASE_URL ??
(process.env.NODE_ENV === "production" ? "http://backend:8000" : "http://localhost:8000");
const nextConfig: NextConfig = {
async rewrites() {
return [
{
source: "/api/v1/:path*",
destination: `${backendBaseUrl}/api/v1/:path*`,
},
];
},
};
export default nextConfig;