/** @type {import('next').NextConfig} */ const backendUrl = process.env.BACKEND_INTERNAL_URL || "http://127.0.0.1:8000"; const nextConfig = { output: "standalone", async rewrites() { return [ { source: "/api/health", destination: `${backendUrl}/health` }, { source: "/api/settings/:path*", destination: `${backendUrl}/settings/:path*` }, { source: "/api/subjects/:path*", destination: `${backendUrl}/subjects/:path*` }, { source: "/api/sources/:path*", destination: `${backendUrl}/sources/:path*` }, { source: "/api/documents/:path*", destination: `${backendUrl}/documents/:path*` }, { source: "/api/jobs/:path*", destination: `${backendUrl}/jobs/:path*` }, ]; }, }; export default nextConfig;