<key>NSAppTransportSecurity</key><dict><key>NSExceptionDomains</key><dict><key>example.com</key><dict><!--Include to allow subdomains--><key>NSIncludesSubdomains</key><true/><!--Include to allow HTTP requests--><key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key><true/><!--Include to specify minimum TLS version--><key>NSTemporaryExceptionMinimumTLSVersion</key><string>TLSv1.1</string></dict></dict></dict>
懒惰的选择是:
<key>NSAppTransportSecurity</key><dict><!--Include to allow all connections (DANGER)--><key>NSAllowsArbitraryLoads</key><true/></dict>
<key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><false/><key>NSExceptionDomains</key><dict><key>example.com</key> <!--Include your domain at this line --><dict><key>NSIncludesSubdomains</key><true/><key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key><true/><key>NSTemporaryExceptionMinimumTLSVersion</key><string>TLSv1.1</string></dict></dict></dict>
<key>NSAppTransportSecurity</key><dict><key>NSExceptionDomains</key><dict><key>myawesomemacbook.local</key><dict><!--Include to allow subdomains--><key>NSIncludesSubdomains</key><true/><!--Include to allow HTTP requests--><key>NSExceptionAllowsInsecureHTTPLoads</key><true/></dict></dict></dict>