HTTPS阻止Ionic build --release android apk [英] HTTPS blocked for Ionic build --release android apk

查看:109
本文介绍了HTTPS阻止Ionic build --release android apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Debug apk工作正常,排除了常见的嫌疑,但是当我构建,签名,安装发布版本时,没有https $ http API调用可以通过angular(http到同一个端点,我允许调试) ,工作)。

Debug apk works fine, which rules out the usual suspects, but when I build, sign, install the release version, no https $http API calls can be made by angular (http to the same endpoint, which I permitted for debugging, works).

安装了cordova白名单
离子插件添加cordova-plugin-whitelist

cordova whitelist is installed ionic plugin add cordova-plugin-whitelist

manifest.xml包含正确的指令

manifest.xml contains the correct directives

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Ionic config.xml包含正确的指令

Ionic config.xml contains the correct directives

  <access origin="*"/>
  <allow-navigation href="*" />

我的index.html声明了一个允许的内容安全政策:

My index.html declares a permissive Content-Security-Policy:

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

我还使用两个不同的在线SSL检查器检查了我的中间证书链 - 它们没问题。

I also checked my intermediate certificate chain using two different online SSL checkers--they are fine.

我完全难过了。任何想法?

I'm totally stumped. Any ideas?

推荐答案

重新申请SSL证书,特别注意包括中间证书。

Re-apply SSL certs taking special care to include intermediary certs.

尽管 https://cryptoreport.websecurity.symantec.com/checker/和其他三个SSL检查员说我的SSL证书很好,为了安全起见我重置并配置了我的AWS Elastic Load Balancer SSL设置,确保我们已经包含了(说是可选的,但不是可选的)中间证书,问题就消失了之后。

Despite https://cryptoreport.websecurity.symantec.com/checker/ and three other SSL checkers saying my SSL certs were fine, just to be safe I reset and configured my AWS Elastic Load Balancer SSL settings ensuring we I had included the (says optional, but not optional) intermediate cert, and the problem went away after that.

这篇关于HTTPS阻止Ionic build --release android apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆