本地开发过程中,使用了vue.config.js中配置proxy的方式解决了跨域请求的问题,配置如下:
devServer: {
proxy: {
'/lonfoul': {
target: ‘http://xxxx/lonfoul’,
pathRewrite: {
'^/lonfoul': ''
},
onProxyReq: function (proxyReq, req, res) {
console.log("原路径:" + req.originalUrl, "代理路径:" + req.path)
}
}
}
}
打包成安卓app安装至手机后,请求无法发出去,跟开发模式下代理配置有关系么
1***@qq.com
请问一下,这个怎么解决,我也是请求有vue.config,js,但是真机ios运行,接口请求错误
2021-05-08 20:45