我的跨域配置是这样的,请求后台的时候应该访问的是8080端口,不知道为什么还是8083端口,有没有哪位大师知道是什么情况呢
module.exports = {
devServer: {
host: 'localhost',
port: '8083',
// 配置要访问的后台地址
proxy: {
'/api': { // 用 /api 来代替下面 target 中的地址
target: `http://127.0.0.1:8080`, // 后台地址(不要忘了写前面的http)
changOrigin: true,//允许跨域
ws:true,
pathRewrite:{
'^/api': ''
}
}
}
}
}
