Accessing secure endpoint from WKWebView loaded from local files
<p>So we are in development of an iPhone application (iOS 9+, not 8), where we are using WKWebView and local files to start the thing up. To get data into the app we are planning to use a secure service that will also handle authentication, and were thinking that CORS was the way to do this.</p>

<p>Loading files from the file system, however, sets the origin in the HTTP request to <code>null</code>, which is not allowed when we also want to send cookies (for authentication). </p>

<p>So my question(s):</p>

<ul>
<li>Can we set an origin in WKWebView to overwrite the <code>null</code> with something like <code><a href="https://acme.server.net" rel="noreferrer">https://acme.server.net</a></code>?</li>
<li>What are other people (you) doing?</li>
<li>Should we consider doing something else other than CORS? (JSONP is not an option).</li>
</ul>