Files
KanzlAI-mGMT/frontend/next.config.ts
m f8d97546e9 fix: preserve /api/ prefix in Next.js rewrite to backend
The rewrite was stripping /api/ from the path, but the Go backend
expects routes at /api/tenants, /api/dashboard etc.
2026-03-25 15:55:58 +01:00

14 lines
285 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "standalone",
rewrites: async () => [
{
source: "/api/:path*",
destination: `${process.env.API_URL || "http://localhost:8080"}/api/:path*`,
},
],
};
export default nextConfig;