diff --git a/nextjs-app/next.config.js b/nextjs-app/next.config.js index 094f506..68fc955 100644 --- a/nextjs-app/next.config.js +++ b/nextjs-app/next.config.js @@ -5,10 +5,11 @@ const nextConfig = { // API Proxy to FastAPI backend async rewrites() { + const apiUrl = process.env.FASTAPI_URL || 'http://localhost:8000/api'; return [ { source: '/api/:path*', - destination: process.env.FASTAPI_URL || 'http://localhost:8000/api/:path*', + destination: `${apiUrl}/:path*`, }, ]; },