Skip to content

Instantly share code, notes, and snippets.

@soltrinox
Last active February 21, 2024 12:04
Show Gist options
  • Select an option

  • Save soltrinox/8a891cdcb053fe91d76a1473fdbc0477 to your computer and use it in GitHub Desktop.

Select an option

Save soltrinox/8a891cdcb053fe91d76a1473fdbc0477 to your computer and use it in GitHub Desktop.
NSURLRequest+DummyInterface.m
#import "NSURLRequest+DummyInterface.h"
@implementation NSURLRequest (IgnoreSSL)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host
{
// ignore certificate errors only for this domain
if ([host hasSuffix:@"http://localhost"])
{
return YES;
}
else
{
return NO;
}
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment