import type { NextConfig } from 'next' const nextConfig: NextConfig = { output: 'standalone', async rewrites() { // INTERNAL_API_URL is the backend service URL (city-service) // Used for proxying API requests from the frontend to the backend const internalApiUrl = process.env.INTERNAL_API_URL || 'http://localhost:7001' return [ { source: '/api/v1/:path*', destination: `${internalApiUrl}/api/v1/:path*`, }, { source: '/api/:path*', destination: `${internalApiUrl}/api/:path*`, }, ] }, } export default nextConfig