美文网首页
ATS安全策略

ATS安全策略

作者: 4VZhang | 来源:发表于2020-12-15 11:36 被阅读0次
"The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." 
UserInfo={NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., NSErrorFailingURLStringKey=http://mysever.com/login/signin, 
NSErrorFailingURLKey=http://mysever.com/login/signin, }

方法1.全局允许http请求

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        < true/>
    </dict>

方法2.除白名单以外只允许https请求

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <false/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>httpDomainName.com</key>
            <dict>
                <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
        </dict>
    </dict>

其中httpDomainName.com替换为自己的http的域名,白名单可以添加多个域名

相关文章

  • ATS安全策略

    方法1.全局允许http请求 方法2.除白名单以外只允许https请求 其中httpDomainName.com替...

  • linux下Tomcat+OpenSSL配置单向&双向认

    背景 由于ios将在2017年1月1日起强制实施ATS安全策略,所有通讯必须使用https传输,本文只针对自制证书...

  • crt文件生成

    Starting ATS Diagnostics nscurl --ats-diagnostics --verbo...

  • iOS 9之适配ATS

    一、简单谈谈ATS(App Transport Security) ATS(App Transport Secur...

  • Apache Traffic Server插件开发手记(一)

    目录 一、编译、安装ATS 二、ATS原理与使用 三、插件开发过程 一、编译、安装ATS 下载解压源代码 wget...

  • The HBase application reported a

    查看ats-hbase状态 yarn app -list yarn app -status ats-hbase 尝...

  • 【转】苹果ATS(强制HTTPS)审核新政解码

    1. ATS App Transport Security(ATS) 是Apple为增强iOS App网络通信安全...

  • ATS

    官方文档参考 要求:如果使用ats 又不满足以下标准则请求被中断并返回nil• The protocol Tr...

  • ATS

    苹果规定 从2017年1月1日起,新提交的 app 不允许使用 NSAllowsArbitraryLoads 来绕...

  • ATS

    强制访问 设置白名单 真机调试http://www.bubuko.com/infodetail-1061938.h...

网友评论

      本文标题:ATS安全策略

      本文链接:https://www.haomeiwen.com/subject/cbzigktx.html