Fix bug where examples always used AFSSLPinningModeNone

This commit is contained in:
Dustin Barker 2013-06-27 22:46:09 -07:00
parent d492c4bff5
commit a5123879a0

View file

@ -51,10 +51,10 @@ static NSString * const kAFAppDotNetAPIBaseURLString = @"https://alpha-api.app.n
// By default, the example ships with SSL pinning enabled for the app.net API pinned against the public key of adn.cer file included with the example. In order to make it easier for developers who are new to AFNetworking, SSL pinning is automatically disabled if the base URL has been changed. This will allow developers to hack around with the example, without getting tripped up by SSL pinning.
if ([[url scheme] isEqualToString:@"https"] && [[url host] isEqualToString:@"alpha-api.app.net"]) {
[self setDefaultSSLPinningMode:AFSSLPinningModePublicKey];
self.defaultSSLPinningMode = AFSSLPinningModePublicKey;
} else {
self.defaultSSLPinningMode = AFSSLPinningModeNone;
}
self.defaultSSLPinningMode = AFSSLPinningModeNone;
return self;
}