16 lines
316 B
TypeScript
16 lines
316 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
// 允许跨域请求后端 API
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: '/api/:path*',
|
|
destination: 'http://localhost:8006/api/:path*', // 服务器本地代理
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|