[ 
https://issues.apache.org/jira/browse/CB-5731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13865605#comment-13865605
 ] 

Jonathan Silverman edited comment on CB-5731 at 1/8/14 4:42 PM:
----------------------------------------------------------------

I believe I have isolated the issue.

You cannot make a XMLHTTPRequest from a page served with http:// to one with 
https:// even if it redirects:

{code:javascript}
$.get("http://time.jsontest.com";, function(){alert("yay")}); // produces alert
{code}

{code:javascript}
$.get("http://google.com";, function(){alert("yay")}); // doesn't
{code}

Right now, only work around if you use https:// looks like to use the CORS http 
configuration directive:

Access-Control-Allow-Origin: *

Here's a quote from Intel's website:

{quote}
Note: The same Cross-Origin Resource Sharing (CORS) restrictions (if any) that 
apply to server-hosted web based HTML5 apps also apply to packaged hybrid apps.
{quote}


was (Author: jsilverman):
I believe I have isolated the issue.

You cannot make a XMLHTTPRequest from a page served with http:// to one with 
https:// even if it redirects:

{code:javascript}
$.get("http://time.jsontest.com";, function(){alert("yay")}); // produces alert
{code}

{code:javascript}
$.get("http://google.com";, function(){alert("yay")}); // doesn't
{code}

Right now, only work around if you use https:// looks like to use the CORS http 
configuration directive:

Access-Control-Allow-Origin: *

> Windows Phone 8 fails to access remote urls
> -------------------------------------------
>
>                 Key: CB-5731
>                 URL: https://issues.apache.org/jira/browse/CB-5731
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP8
>    Affects Versions: 3.3.0
>            Reporter: John McLear
>            Assignee: Jesse MacFadyen
>         Attachments: BrokenXDKXHRDemo.zip
>
>
> Doing a very simple:  
> {code:javascript}
> $.get("http://google.com";, function(){alert("yay")});
> {code}
> Fails on Windows Phone 8.
> Basically Cross domain requests don't work, this includes when an explicit 
> and/or wildcard exclusion is set in config.xml allowed domains



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to