The rewrite was stripping /api/ from the path, but the Go backend expects routes at /api/tenants, /api/dashboard etc.
14 lines
285 B
TypeScript
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;
|