解决android 5.0 webview不能加载http与https混合内容的问题

解决webview白屏问题

The page at 'https://lab.chinapnr.com/muser/publicRequests' was loaded over HTTPS, 
but is submitting data to an insecure location at 'http://XXXX/A4/chinapnrhandle/deposit.html': 
this content should also be submitted over HTTPS.
", source: https://lab.chinapnr.com/muser/publicRequests (1)

其中XXXX是域名,地址,不方便公开, 大概意思就是 A地址是通过Https方式加载的, 但是在提交数据的时候,却提交到了一个不安全的地址B,http格式的,所以,它要求B地址也通过https加载

解决方式,设置https和http两种模式混合加载,只要在设置webview的时候,加上下面这句话

setting.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值