UIWebView loadRequest forcing to https?

NSURL *url = [NSURL URLWithString:s];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[_webView loadRequest:request];

Somehow the request is getting converted from http to https in iOS 9 on iPad mini.

In my shouldStartLoadWithRequest method, I log the requests and I notice that it starts okay with the requests being http, then it suddenly changes to https without me doing anything.


Anyone seeing the same?

Answered by elementarteilchen in 9084022

This is a new "security" feature. iOS 9 enforces secure connections, so all normal "http" connections will fail by default. Right now this won't work for many use cases, so you can opt-out for specific domains or even completely. Look for the keyword "App Transport Security" (ATS).


You'll find some more information in this thread:

https://forums.developer.apple.com/message/5857

Accepted Answer

This is a new "security" feature. iOS 9 enforces secure connections, so all normal "http" connections will fail by default. Right now this won't work for many use cases, so you can opt-out for specific domains or even completely. Look for the keyword "App Transport Security" (ATS).


You'll find some more information in this thread:

https://forums.developer.apple.com/message/5857

Thank you! It's not in the docs anywhere according to that thread.

UIWebView loadRequest forcing to https?
 
 
Q