Cordova白名单iOS 10 SSL错误:加载资源失败:发生SSL错误,无法与服务器建立安全连接

Cordova白名单iOS 10 SSL错误:加载资源失败:发生SSL错误,无法与服务器建立安全连接,ios,cordova,vimeo,whitelist,Ios,Cordova,Vimeo,Whitelist,我正试图发送一个ArrayBuffer到 https://1511921174.cloud.vimeo.com/upload?ticket_id=xxxxxxxxxx&video_file_id=xxxxxx&signature=xxxxxxxx=1%22 在iOS 10中,什么都没有发生。一定有白名单错误。我根据cordova插件白名单文档将*.vimeo.com和*.cloud.vimeo.com列入白名单。在iOS 9和Android上,一切都很好 <access

我正试图发送一个ArrayBuffer到

https://1511921174.cloud.vimeo.com/upload?ticket_id=xxxxxxxxxx&video_file_id=xxxxxx&signature=xxxxxxxx=1%22
在iOS 10中,什么都没有发生。一定有白名单错误。我根据cordova插件白名单文档将*.vimeo.com和*.cloud.vimeo.com列入白名单。在iOS 9和Android上,一切都很好

<access origin="http://*.vimeo.com" subdomains="true" />
<access origin="https://*.vimeo.com" subdomains="true" />
<access origin="http://*.cloud.vimeo.com" subdomains="true" />
<access origin="https://*.cloud.vimeo.com" subdomains="true" />

你知道会发生什么吗?
谢谢

我不得不对iOS 10()的内容安全策略元标记进行调整,因此您可能还需要添加/更新该标记,例如

<meta http-equiv="Content-Security-Policy" content="default-src 'self' gap: file: https://*.cloud.vimeo.com; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; media-src *">

我不得不对iOS 10()的内容安全策略元标记进行调整,因此您可能还需要添加/更新该标记,例如

<meta http-equiv="Content-Security-Policy" content="default-src 'self' gap: file: https://*.cloud.vimeo.com; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; media-src *">

看起来这不是一个白名单,而是一个应用程序传输安全问题

我用iOS 10将视频上传到Vimeo。看起来Vimeo的SSL证书可能有问题。他们可能使用旧的TLS版本。当我在plist中关闭应用程序传输安全时,它只是起作用:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>
NSAppTransportSecurity
NSAllowsArbitraryLoads
因此,在没有关闭所有功能的情况下,我只在plist for vimeo.com中添加了以下代码:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>vimeo.com</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <false/>
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <false/>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionMinimumTLSVersion</key>
            <string>TLSv1.0</string>
            <key>NSRequiresCertificateTransparency</key>
            <false/>
        </dict>
    </dict>
</dict>
NSAppTransportSecurity
NSExceptionDomains
vimeo.com
N异常低安全Http负载
N第三方异常低安全Http负载
NSExceptionRequiresForwardSecretary
N第三方例外要求转发保密
n包括多个域
NSExceptionMinimumTLSVersion
TLSv1.0
NSRequiresCertificateTransparency

我希望这对任何人都有帮助。

看起来这不是一个白名单,而是一个应用程序传输安全问题

我用iOS 10将视频上传到Vimeo。看起来Vimeo的SSL证书可能有问题。他们可能使用旧的TLS版本。当我在plist中关闭应用程序传输安全时,它只是起作用:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>
NSAppTransportSecurity
NSAllowsArbitraryLoads
因此,在没有关闭所有功能的情况下,我只在plist for vimeo.com中添加了以下代码:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>vimeo.com</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <false/>
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <false/>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionMinimumTLSVersion</key>
            <string>TLSv1.0</string>
            <key>NSRequiresCertificateTransparency</key>
            <false/>
        </dict>
    </dict>
</dict>
NSAppTransportSecurity
NSExceptionDomains
vimeo.com
N异常低安全Http负载
N第三方异常低安全Http负载
NSExceptionRequiresForwardSecretary
N第三方例外要求转发保密
n包括多个域
NSExceptionMinimumTLSVersion
TLSv1.0
NSRequiresCertificateTransparency

我希望这对任何人都有帮助。

在我用config.xml中的edit-config标记添加Info.Plist条目之前。 但由于一个模糊的原因,当我重写NsAppTransportSecurity条目时,它不起作用

经过一些研究,我发现cordova插件白名单也从2015年10月开始将config.xml中的“access”和“allow navigation”标记转换为Info.Plist文件中的NsAppTransportSecurity条目()

因此,插件阻止我的config.xml中的edit-config标记覆盖此条目。 根据Cordova提供的信息,您可以在config.xml中的“access”和“allow navigation”标记中设置传输安全选项。
我这样做了,现在效果很好。

在我添加Info.Plist条目之前,在config.xml中使用edit-config标记。 但由于一个模糊的原因,当我重写NsAppTransportSecurity条目时,它不起作用

经过一些研究,我发现cordova插件白名单也从2015年10月开始将config.xml中的“access”和“allow navigation”标记转换为Info.Plist文件中的NsAppTransportSecurity条目()

因此,插件阻止我的config.xml中的edit-config标记覆盖此条目。 根据Cordova提供的信息,您可以在config.xml中的“access”和“allow navigation”标记中设置传输安全选项。
我这样做了,现在效果很好。

谢谢你的评论。我将你的代码添加到我的CSP中,但没有帮助。谢谢你的评论。我将你的代码添加到我的CSP中,但没有任何帮助。唯一让它对我起作用的东西…我可以发誓我以前放过这个,但它显然没有保存…我想我必须直接使用文本编辑器而不是xcode编辑plist文件。唯一让它对我起作用的东西…我可以发誓我以前放过这个,但它显然没有保存…我想我已经保存了直接使用文本编辑器而不是xcode编辑plist文件。