Files
ViGent2/frontend/next.config.ts
Kevin Wong f99bd336c9 更新
2026-01-26 12:18:54 +08:00

24 lines
594 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// 允许跨域请求后端 API
async rewrites() {
return [
{
source: '/api/:path*',
destination: 'http://localhost:8006/api/:path*', // 服务器本地代理
},
{
source: '/uploads/:path*',
destination: 'http://localhost:8006/uploads/:path*', // 转发上传的素材
},
{
source: '/outputs/:path*',
destination: 'http://localhost:8006/outputs/:path*', // 转发生成的视频
},
];
},
};
export default nextConfig;