From 5d646779c9bddb8af060d39c3761eecffaedb415 Mon Sep 17 00:00:00 2001 From: Felipe Cardoso Date: Tue, 6 Jan 2026 03:12:08 +0100 Subject: [PATCH] fix(frontend): preserve /api prefix in Next.js rewrite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rewrite was incorrectly configured: - Before: /api/:path* -> http://backend:8000/:path* (strips /api) - After: /api/:path* -> http://backend:8000/api/:path* (preserves /api) This was causing requests to /api/v1/agent-types to be sent to http://backend:8000/v1/agent-types instead of the correct path. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- 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 87db554..5b863a3 100755 --- a/frontend/next.config.ts +++ b/frontend/next.config.ts @@ -79,7 +79,7 @@ const nextConfig: NextConfig = { return [ { source: '/api/:path*', - destination: 'http://backend:8000/:path*', + destination: 'http://backend:8000/api/:path*', }, ]; },