vue.config.js文件的相关内容如下:
module.exports = {
devServer:{
open:true,
host:'localhost',
port:8081,
https:false,
proxy:{ // 配置跨域
'/api':{
target:'http://localhost:5001/api/',
ws:true,
changeOrigin:true,
pathRewrite:{
'^/api':''
}
}
}
}
}
欢迎访问博客:blog.csdn.net/Miss_liangr…