From 22fec7c937df502501a11ff1e404ae44a01da946 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Sun, 1 Mar 2026 22:02:46 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20add=20Next.js=20rewrite=20for=20/api=20?= =?UTF-8?q?=E2=86=92=20backend=20proxy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Routes /api/* requests to backend:8000 internally via Docker network. Replaces nginx reverse proxy with Next.js built-in rewrites. --- frontend/next.config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/next.config.ts b/frontend/next.config.ts index f978856..cddd7ac 100644 --- a/frontend/next.config.ts +++ b/frontend/next.config.ts @@ -4,6 +4,14 @@ const nextConfig: NextConfig = { turbopack: { root: __dirname, }, + async rewrites() { + return [ + { + source: "/api/:path*", + destination: "http://backend:8000/:path*", + }, + ]; + }, images: { remotePatterns: [ {