在next.config.js中使用rewrites解决跨域 async rewrites() { return [ { source: '/api/:path*', destination: `xxx.com/api/:path\*… } ] } 接口调用的时候使用 '/api/...'这种格式, 当然也可以使用express,网上教程很多
在next.config.js中使用rewrites解决跨域 async rewrites() { return [ { source: '/api/:path*', destination: `xxx.com/api/:path\*… } ] } 接口调用的时候使用 '/api/...'这种格式, 当然也可以使用express,网上教程很多