/** @type {import('next').NextConfig} */ const backendUrl = process.env.BACKEND_URL || process.env.NEXT_PUBLIC_BACKEND_URL || 'http://127.0.0.1:5000'; const nextConfig = { async rewrites() { return [ { source: '/api/:path*', destination: `${backendUrl}/api/:path*`, }, { source: '/photos/:path*', destination: `${backendUrl}/photos/:path*`, }, ]; }, }; export default nextConfig;