在next.config.js中,通过配置rewrites fallback来把请求代理到指定域名
module.exports = {
...
async rewrites() {
return {
fallback: [
{
source: '/:path*',
destination: `https://host/:path*`,
},
],
}
}
}
标签:代理,域名,nextjs,path,fallback,rewrites
From: https://www.cnblogs.com/sk-3/p/16900154.html