From 0646478cfff7e6dfeda26e1f2e0e85df2602b87a Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Thu, 17 Feb 2022 20:11:24 -0800 Subject: [PATCH] Use HTTPS --- Earthquakes/DownloadEarthquakesOperation.swift | 2 +- Earthquakes/Info.plist | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Earthquakes/DownloadEarthquakesOperation.swift b/Earthquakes/DownloadEarthquakesOperation.swift index 536c7ad..5fe7e63 100644 --- a/Earthquakes/DownloadEarthquakesOperation.swift +++ b/Earthquakes/DownloadEarthquakesOperation.swift @@ -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?) } diff --git a/Earthquakes/Info.plist b/Earthquakes/Info.plist index 5b1f2d5..65bec02 100644 --- a/Earthquakes/Info.plist +++ b/Earthquakes/Info.plist @@ -25,13 +25,7 @@ NSAppTransportSecurity NSExceptionDomains - - earthquake.usgs.gov - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - + NSLocationAlwaysUsageDescription Earthquakes uses your location to show how close you are to the epicenter of an earthquake.