predictor / apps /web /next.config.mjs
pengpeng9099's picture
Deploy World Cup 2026 Predictor (docker space)
1790bde verified
Raw History Blame Contribute Delete
523 Bytes
/** @type {import('next').NextConfig} */
const API_BACKEND =
process.env.API_BACKEND ||
(process.env.API_BACKEND_HOSTPORT
? `http://${process.env.API_BACKEND_HOSTPORT}`
: "http://127.0.0.1:8000");
const nextConfig = {
reactStrictMode: true,
async rewrites() {
// proxy /api/* to the FastAPI backend so the whole app is single-origin
// (one public URL serves both frontend and API)
return [{ source: "/api/:path*", destination: `${API_BACKEND}/api/:path*` }];
},
};
export default nextConfig;