用户
This commit is contained in:
16
charging_web_app/next.config.mjs
Normal file
16
charging_web_app/next.config.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
// 其他 Next.js 配置...
|
||||
|
||||
// 添加 rewrites 配置用于开发环境代理
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*', // 匹配所有以 /api 开头的路径
|
||||
destination: 'http://localhost:7529/api/:path*', // 代理到后端服务地址
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in New Issue
Block a user