Files
2026-09-21 11:19:07 +08:00

17 lines
429 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
reactStrictMode: true,
// 同源代理:前端 /api/* → 本地后端(避免开发档 CORS;生产由反向代理承担同职责)
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${process.env.HUNJING_API_URL ?? "http://127.0.0.1:8000"}/:path*`,
},
];
},
};
export default nextConfig;