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:
@@ -5,7 +5,7 @@ const nextConfig: NextConfig = {
|
|||||||
rewrites: async () => [
|
rewrites: async () => [
|
||||||
{
|
{
|
||||||
source: "/api/:path*",
|
source: "/api/:path*",
|
||||||
destination: `${process.env.API_URL || "http://localhost:8080"}/:path*`,
|
destination: `${process.env.API_URL || "http://localhost:8080"}/api/:path*`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user