08-31-2014 12:35 PM
I need to do AJAX (XHR) request in my app, but I am unable to whitelist the server(s) becasues the servers are set by the user at run-time (GPS-reporting app that can communicate to any given server, based on user settings).
This was once suggested to me a while back (add to config.xml), do disable AJAX whitelist / blacklist:
<feature id="blackberry.app"> <param name="websecurity" value="disable" /> </feature>
My questions are:
I realize I could run a proxy at a fixed address to overcome this, but I would rather use this as a VERY last resort.
Thanks very much,
Solved! Go to Solution.
09-03-2014 11:18 AM
You can disable websecurity in WebWorks 2.1, but the syntax is slightly different:
<platform name="blackberry10"> <preference name="WebSecurity" value="disable" /> </platform>
It will be allowed in a completed app. The onus is on you to ensure that you aren't mixing in untrusted content.
WebSocket is supported but it has the same cross origin limiations as XHR.
09-04-2014 11:38 AM