App Transport Security:RESTful API的哪种方法? `NSExceptionAllowsInsecureHTTPLoads`或`NSAllowsArbitraryLoads`

时间:2015-10-14 22:29:19

标签: ios rest security

我升级到Xcode 7.0.1,其中项目针对iOS 9.如果我想允许使用HTTP的RESTful API,我应该使用NSExceptionAllowsInsecureHTTPLoads还是NSAllowsArbitraryLoads?它有什么优势?

1 个答案:

答案 0 :(得分:2)

我会使用 NSAllowsArbitraryLoads 并使用 NSExceptionDomains ,而不是根据App-Transport-Security-Technote禁用所有https。但是,如果您自己的服务器仅为http,则应考虑在大约一个月内使用Let’s Encrypt中的免费证书。