Skip to content

Commit 0dcc172

Browse files
committed
Add https to proxy
1 parent ef6754d commit 0dcc172

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ios/IONAssetHandler.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ - (void)webView:(WKWebView *)webView startURLSchemeTask:(id <WKURLSchemeTask>)ur
4141
}
4242
loadFile = false;
4343
startPath = [stringToLoad stringByReplacingOccurrencesOfString:@"/_http_proxy_" withString:@"http://"];
44-
//startPath = [stringToLoad stringByReplacingOccurrencesOfString:@"/_https_proxy_" withString:@"https://"];
44+
startPath = [startPath stringByReplacingOccurrencesOfString:@"/_https_proxy_" withString:@"https://"];
4545
NSURL * requestUrl = [NSURL URLWithString:startPath];
4646
WKWebsiteDataStore* dataStore = [WKWebsiteDataStore defaultDataStore];
4747
WKHTTPCookieStore* cookieStore = dataStore.httpCookieStore;
@@ -63,14 +63,13 @@ - (void)webView:(WKWebView *)webView startURLSchemeTask:(id <WKURLSchemeTask>)ur
6363
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)response;
6464
NSArray* cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:[httpResponse allHeaderFields] forURL:response.URL];
6565
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookies:cookies forURL:httpResponse.URL mainDocumentURL:nil];
66-
cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies];
66+
cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies];
6767

6868
for (NSHTTPCookie* c in cookies)
6969
{
7070
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
7171
//running in background thread is necessary because setCookie otherwise fails
7272
dispatch_async(dispatch_get_main_queue(), ^(void){
73-
NSLog(@"sync cookie: %@", c.name);
7473
[cookieStore setCookie:c completionHandler:nil];
7574
});
7675
});

0 commit comments

Comments
 (0)