19 lines
409 B
TypeScript
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;
|