mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-01-31 00:00:03 +08:00
support public asset path for capacitor engine
This commit is contained in:
@@ -156,7 +156,15 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) {
|
||||
@implementation SM_AFSecurityPolicy
|
||||
|
||||
+ (NSSet *)certificatesInBundle:(NSBundle *)bundle {
|
||||
NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"www/certificates"];
|
||||
NSArray* paths = @[];
|
||||
for(NSString* dir in @[@"www", @"public"]) {
|
||||
NSArray* certificatePaths = [bundle pathsForResourcesOfType:@"cer" inDirectory: [NSString stringWithFormat:@"%@/certificates", dir]];
|
||||
if(certificatePaths.count > 0) {
|
||||
paths = certificatePaths;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
NSMutableSet *certificates = [NSMutableSet setWithCapacity:[paths count]];
|
||||
|
||||
for (NSString *path in paths) {
|
||||
|
||||
Reference in New Issue
Block a user