Nextjs请求代理配置
Nextjs版本:14.0.3
修改next.config.js文件
/** @type {import('next').NextConfig} /
const nextConfig = {
/* @description 开发模式下请求代理设置 /
async rewrites() {
return {
fallback: [
{
source: '/api/:path',
destination: 'https://loaclhost:8060/:path*',
},
]
}
},
}
module.exports = nextConfig

浙公网安备 33010602011771号