Spaces:
Running
Running
| /** @type {import('next').NextConfig} */ | |
| const nextConfig = { | |
| rewrites: async () => { | |
| // Fallback to localhost if not specified | |
| const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://127.0.0.1:8000'; | |
| return [ | |
| { | |
| source: '/api/:path*', | |
| destination: `${apiUrl}/api/:path*`, | |
| }, | |
| ] | |
| }, | |
| }; | |
| export default nextConfig; | |