Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
New Contributor
Posts: 6
Registered: ‎03-24-2013
My Device: bb10
My Carrier: China Mobile
Accepted Solution

How to resolve Origin local:// is not allowed by Access-Control-Allow-Origin.

i try to use the $.ajax to call other service, this method run correct on the android, iphone, but failed on bb10 simulator,

 

get the message from web inspector:

 

XMLHttpRequest cannot load http://www.example.com/getData 

Origin local:// is not allowed by Access-Control-Allow-Origin.

 

i have added <access uri="*"subdomains="true"/> in config.xml.

 

I try to google for the solution, but I failed, can anyone to help me, thanks.

New Contributor
Posts: 6
Registered: ‎03-24-2013
My Device: bb10
My Carrier: China Mobile

Re: How to resolve Origin local:// is not allowed by Access-Control-Allow-Origin.

I have resolved it, i think the blackberry document need to provide detailed setting about webworks.

this waste my many times on it.

 

   <accessuri="*"subdomains="true"/>

 

  <featureid="blackberry.app"required="true"version="1.0.0.0">

  <paramname="orientation"value="portrait"/>

  <paramname="websecurity"value="disable"/>

  </feature>

Developer
Posts: 18
Registered: ‎02-13-2014
My Device: Z10 STL-003
My Carrier: AT&T

Re: How to resolve Origin local:// is not allowed by Access-Control-Allow-Origin.

Is there a way to disable websecurity in a webview (cascades)?