2018. 4. 22.

App Transport Security has blocked a cleartext HTTP

Error Message: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
  • Allow all sites

// 전체 허용 
<key> NSAppTransportSecurity </key>
  <dict> 
    <key> NSAllowsArbitraryLoads </key>
      <true /> 
    </dict>
  • Allow specific sites

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>example.com</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSIncludesSubdomains</key>
            <true/>
        </dict>
    </dict>
</dict>



댓글 없음:

댓글 쓰기