15 lines
306 B
TypeScript
15 lines
306 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {};
|
|
|
|
const apiTarget = process.env.BACKEND_API_ORIGIN ?? "http://127.0.0.1:8000";
|
|
|
|
nextConfig.rewrites = async () => [
|
|
{
|
|
source: "/backend/:path*",
|
|
destination: `${apiTarget}/api/:path*`,
|
|
},
|
|
];
|
|
|
|
export default nextConfig;
|