//next.config.js
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
async rewrites() {
return [
{
source: '/api/:path*',
destination: `http://localhost:5000/api/:path*`,
},
];
},
}
module.exports = nextConfig
next.js 配置代理服务器(跨域问题)亲测有效
于 2024-07-25 19:01:33 首次发布