uniapp请求接口前端配置跨域例如请求接口为 'https://aip.baidu.com/oauth/2.0/token'
但是在manifest.json配置还是不行
"h5" : {
"template" : "template.h5.html",
"devServer" : {
"https" : false,
"disableHostCheck": true,
"proxy": {
"/api": {
"target": "https://aip.baidu.com",
"changeOrigin": true,
"secure": false,
"pathRewrite": {
"^/api": ""
}
}
}
},
"router" : {
"mode" : "history"
}
}
http://10.8.9.32:8083/oauth/2.0/token 404 (Not Found)
能够请求出数据
404是 url错误吧 。看看 url 对不对。