草庐IT

ios - 应用程序传输安全 : Which method for RESTful APIs? `NSExceptionAllowsInsecureHTTPLoads` 或 `NSAllowsArbitraryLoads`

coder 2024-01-18 原文

我升级到 Xcode 7.0.1,其中项目以 iOS 9 为目标。如果我想允许 RESTful API 与 HTTP,我应该使用 NSExceptionAllowsInsecureHTTPLoads 还是 NSAllowsArbitraryLoads?哪个有什么优势?

最佳答案

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

关于ios - 应用程序传输安全 : Which method for RESTful APIs? `NSExceptionAllowsInsecureHTTPLoads` 或 `NSAllowsArbitraryLoads`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33136721/

有关ios - 应用程序传输安全 : Which method for RESTful APIs? `NSExceptionAllowsInsecureHTTPLoads` 或 `NSAllowsArbitraryLoads`的更多相关文章

随机推荐