[webkit-dev] Disable WebKit2 Security

Koen Bok koen at madebysofa.com
Mon Nov 24 12:23:53 PST 2014

I'm trying to disable some web security for my Mac desktop app. Currently,
if I try to load a local json file I get the error:

[Error] XMLHttpRequest cannot load file:///Users/koen/Desktop/test.json.
Cross origin requests are only supported for HTTP.

I tried setting the following two configuration options with the C api:
WKPreferencesSetWebSecurityEnabled(prefsRef, false);
WKPreferencesSetFileAccessFromFileURLsAllowed(prefsRef, true);

But none of these seem to do anything.

What am I missing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20141124/b955faf0/attachment.html>

More information about the webkit-dev mailing list