Home » IOS » Note: the WebView add Cookie NT_iOS

Note: the WebView add Cookie NT_iOS

Where is the

webview key information? Is it safe to transport?


plus HTTPS in cookie, the capture will not be caught in.



, NSDictionary, *properties = [[NSMutableDictionary, alloc], init];
[properties setValue:[share () getSessionKey] forKey:NSHTTPCookieValue];
[properties setValue:@, "sessionKey", forKey:NSHTTPCookieName];
[properties setValue:[url host] forKey:NSHTTPCookieDomain];
[properties setValue:[url path] forKey:NSHTTPCookiePath];
[properties setValue:[NSDate dateWithTimeIntervalSinceNow:60*60] forKey:NSHTTPCookieExpires];
NSHTTPCookie *cookie = [[NSHTTPCookie, alloc], initWithProperties:properties];
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookie:cookie];
[_webView, loadRequest:[NSURLRequest, requestWithURL:url, cachePolicy:NSURLRequestReloadIgnoringCacheData, timeoutInterval:15]];





OK, that's settled!



copyright notice: This article is original article for blogger. Without permission from blogger,.

must not be reprinted

Latest