From f8d97546e9aff75ef7c4f4b0d1a20456009d5bab Mon Sep 17 00:00:00 2001 From: m Date: Wed, 25 Mar 2026 15:55:58 +0100 Subject: [PATCH] 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. --- frontend/next.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/next.config.ts b/frontend/next.config.ts index 837f622..b301871 100644 --- a/frontend/next.config.ts +++ b/frontend/next.config.ts @@ -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*`, }, ], };