extension URL { /// Converts URL to a "https" scheme func secure() -> URL? { guard var comps = URLComponents(url: self, resolvingAgainstBaseURL: false) else { return nil } comps.scheme = "https" return comps.url } }