Skip to content

Commit

Permalink
demo不拦截淘宝的重定向请求
Browse files Browse the repository at this point in the history
  • Loading branch information
karosLi committed Jan 12, 2021
1 parent 9797e96 commit 072a8da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions KKJSBridgeDemo/KKJSBridgeDemo/HtmlURLProtocol.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ + (BOOL)canInitWithRequest:(NSURLRequest *)request {
if ([NSURLProtocol propertyForKey:kKKJSBridgeNSURLProtocolKey inRequest:request]) {
return NO;
}

if ([request.URL.host hasPrefix:@"redirect.simba.taobao.com"]) {
return NO;
}

NSLog(@"HtmlURLProtocol %@", request.URL.absoluteString);
return YES;
Expand Down

0 comments on commit 072a8da

Please sign in to comment.