const nextConfig = { async rewrites() { const base = process.env.NEXT_PUBLIC_API_URL || 'https://arkitel.onrender.com'; const normalized = base.replace(/\/$/, ''); return [ { source: '/api/:path*', destination: `${normalized}/api/:path*`, }, { source: '/static/:path*', destination: `${normalized}/static/:path*`, }, ]; }, }; module.exports = nextConfig;