Skip to content

Commit

Permalink
ADD: add security policy property to YTKNetworkConfig
Browse files Browse the repository at this point in the history
Change-Id: Ic13c8abafcbaf7a4aec79c2f01badc92609b7ee1
  • Loading branch information
huangling committed Jan 6, 2016
1 parent b97ed8e commit f62c3f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions YTKNetwork/YTKNetworkAgent.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ - (id)init {
_manager = [AFHTTPRequestOperationManager manager];
_requestsRecord = [NSMutableDictionary dictionary];
_manager.operationQueue.maxConcurrentOperationCount = 4;
_manager.securityPolicy = _config.securityPolicy;
}
return self;
}
Expand Down
1 change: 1 addition & 0 deletions YTKNetwork/YTKNetworkConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
@property (strong, nonatomic) NSString *cdnUrl;
@property (strong, nonatomic, readonly) NSArray *urlFilters;
@property (strong, nonatomic, readonly) NSArray *cacheDirPathFilters;
@property (strong, nonatomic) AFSecurityPolicy *securityPolicy;

- (void)addUrlFilter:(id<YTKUrlFilterProtocol>)filter;
- (void)addCacheDirPathFilter:(id <YTKCacheDirPathFilterProtocol>)filter;
Expand Down
1 change: 1 addition & 0 deletions YTKNetwork/YTKNetworkConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ - (id)init {
if (self) {
_urlFilters = [NSMutableArray array];
_cacheDirPathFilters = [NSMutableArray array];
_securityPolicy = [AFSecurityPolicy defaultPolicy];
}
return self;
}
Expand Down

0 comments on commit f62c3f7

Please sign in to comment.