vue proxy跨域设置失败 changeOrigin: true
正常是这样:module.exports = {lintOnSave: false,devServer: {// host: '127.0.0.1',// port: 8080,open: true, // vue项目启动时自动打开浏览器proxy: 'https://baidu.me', // 写你要请求的接口地址}},disableHostCheck: true},};如果无效请检查,试试是不
·
正常是这样:
module.exports = {
lintOnSave: false,
devServer: {
// host: '127.0.0.1',
// port: 8080,
open: true, // vue项目启动时自动打开浏览器
proxy: 'https://baidu.me', // 写你要请求的接口地址
}
},
disableHostCheck: true
},
};
如果无效请检查,试试是不是’https’写成了’http’,我就是写错了,捣鼓了一个晚上
更多推荐
已为社区贡献39条内容
所有评论(0)