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.
This commit is contained in:
m
2026-03-25 15:55:58 +01:00
parent 45605c803b
commit f8d97546e9

View File

@@ -5,7 +5,7 @@ const nextConfig: NextConfig = {
rewrites: async () => [
{
source: "/api/:path*",
destination: `${process.env.API_URL || "http://localhost:8080"}/:path*`,
destination: `${process.env.API_URL || "http://localhost:8080"}/api/:path*`,
},
],
};