iOS和浏览器API调用工作正常,但Android模拟器会阻止/删除API网址并阻止对localhost的调用。生产HTTPS服务器上的调用工作正常。
CORS已经实施并正在处理每个HTTP请求。
如何在Cordova Android 6.3.0和Ionic 3.19上允许调用非HTTPS localhost?
我在config.xml中允许以下内容
<allow-navigation href="http://*/*" />
答案 0 :(得分:0)
你在运行离子cordova模拟 - 地址localhost吗?
Ionic做出一些网络假设。
您是否安装了https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/?