Use HTTPS

This commit is contained in:
Sami Samhuri 2022-02-17 20:11:24 -08:00
parent 69f9a71b0f
commit 0646478cff
No known key found for this signature in database
GPG key ID: 4B4195422742FC16
2 changed files with 2 additions and 8 deletions

View file

@ -29,7 +29,7 @@ class DownloadEarthquakesOperation: GroupOperation {
or when the services you use offer secure communication options, you
should always prefer to use https.
*/
let url = URL(string: "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_month.geojson")!
let url = URL(string: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_month.geojson")!
let task = URLSession.shared.downloadTask(with: url) { url, response, error in
self.downloadFinished(url: url, response: response as? HTTPURLResponse, error: error as NSError?)
}

View file

@ -25,13 +25,7 @@
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>earthquake.usgs.gov</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
<dict/>
</dict>
<key>NSLocationAlwaysUsageDescription</key>
<string>Earthquakes uses your location to show how close you are to the epicenter of an earthquake.</string>