File size: 520 Bytes
d988ae4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
env: {
NEXT_PUBLIC_URL: process.env.NEXT_PUBLIC_URL,
PUBLIC_SOCKET_URL: process.env.PUBLIC_SOCKET_URL
},
async rewrites() {
const backendUrl = process.env.DOCKER_BACKEND_URL || 'http://127.0.0.1:3001';
return [
{
source: '/api/:path*',
destination: `${backendUrl}/api/:path*` // Backend is co-located with the frontend in the Space image
},
];
},
};
export default nextConfig; |