Skip to content

Commit f8e0008

Browse files
committed
Changed to static property
1 parent a91387f commit f8e0008

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/UsefulNetworkLayer/NetworkLayer/NetworkLayer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public class NetworkLayer: NSObject, URLSessionDataDelegate {
8888
/// If `true`, Network Layer will accept challenges, otherwise it will cancel authentication challenges.
8989
///
9090
/// Defaults to `true`.
91-
public var allowInvalidCertificates: Bool = true
91+
static public var allowInvalidCertificates: Bool = true
9292

9393
/// Private initializer
9494
private override init() {
@@ -356,7 +356,7 @@ public class NetworkLayer: NSObject, URLSessionDataDelegate {
356356
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
357357
var disposition = URLSession.AuthChallengeDisposition.performDefaultHandling
358358
var credentials: URLCredential? = nil
359-
if allowInvalidCertificates {
359+
if NetworkLayer.allowInvalidCertificates {
360360
if let trust = challenge.protectionSpace.serverTrust {
361361
credentials = URLCredential(trust: trust)
362362
}

0 commit comments

Comments
 (0)