import type { NextConfig } from "next"; const remoteApiUrl = process.env.REMOTE_API_URL ?? "https://multica-api.copilothub.ai"; const nextConfig: NextConfig = { async rewrites() { return [ { source: "/api/:path*", destination: `${remoteApiUrl}/api/:path*`, }, { source: "/ws", destination: `${remoteApiUrl}/ws`, }, { source: "/auth/:path*", destination: `${remoteApiUrl}/auth/:path*`, }, ]; }, }; export default nextConfig;