ATS 域异常上的通配符? [英] Wildcards on ATS Domain exceptions?

查看:24
本文介绍了ATS 域异常上的通配符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 Xamarin 生产应用中,我们检索了不同域中的 HLS 播放列表的未定义列表.是否可以在 ATS 异常字典上使用通配符?
我尝试过类似的事情,但没有成功:

In my production Xamarin apps, we retrieve a non-defined list of HLS playlist within differents domains. Is possible to use wildcards on the ATS exception dictionary?
I tried something like that but without success:

<key>http://*.domain.com</key>
<dict>
    <key>NSExceptionAllowsInsecureHTTPLoads</key>
    <true/>
    <key>NSIncludesSubdomains</key>
    <true/>
</dict>

推荐答案

试试这个:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>domain.com</key>
        <dict>
             <key>NSExceptionRequiresForwardSecrecy</key>
             <false/>
             <key>NSExceptionAllowsInsecureHTTPLoads</key>
             <true/>
             <key>NSIncludesSubdomains</key>
             <true/>
        </dict>
    </dict>
</dict>

这篇关于ATS 域异常上的通配符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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