You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Clément Prévost (JIRA)" <ji...@apache.org> on 2016/09/30 17:07:20 UTC

[jira] [Commented] (CB-10359) Origin null is not allowed by Access-Control-Allow-Origin

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

Clément Prévost commented on CB-10359:
--------------------------------------

I also have this error on windows phone 10 (universal apps) on cordova 6.3.1
The exact same code works without cors problem on android and ios.

> Origin null is not allowed by Access-Control-Allow-Origin
> ---------------------------------------------------------
>
>                 Key: CB-10359
>                 URL: https://issues.apache.org/jira/browse/CB-10359
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin Whitelist
>    Affects Versions: 5.4.1
>         Environment: osx el capitan
> Xcode7.2
> Cordova iOS 4.0.1
> ios 9.2
>            Reporter: Calin Staver
>              Labels: newbie
>             Fix For: 5.4.1
>
>
> {code:title=config.xml|borderStyle=solid}
> <?xml version='1.0' encoding='utf-8'?>
> <widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
>     <name>Smoney</name>
>     <description>
>         A sample Apache Cordova application that responds to the deviceready event.
>     </description>
>     <author email="dev@cordova.apache.org" href="http://cordova.io">
>         Apache Cordova Team
>     </author>
>     <content src="index.html" />
>     <plugin name="cordova-plugin-whitelist" spec="0" />
>     <access origin="*"  />
>     <allow-navigation href="*" />
>     <allow-intent href="http://*/*" />
>     <allow-intent href="https://*/*" />
>     <allow-intent href="tel:*" />
>     <allow-intent href="sms:*" />
>     <allow-intent href="mailto:*" />
>     <allow-intent href="geo:*" />
>     <platform name="android">
>         <allow-intent href="market:*" />
>     </platform>
>     <platform name="ios">
>         <allow-intent href="itms:*" />
>         <allow-intent href="itms-apps:*" />
>     </platform>
> </widget>
> {code}
> When i try to load(with javascript) a internal html page (fle:///) for example settings or about i get error.
> {code}
> [Error] Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin. (settings.html, line 0)
> [Error] XMLHttpRequest cannot load file:///Users/calin/Library/Developer/CoreSimulator/Devices/6EC99739-0284-4511-A701-13C46CDFB6F4/data/Containers/Bundle/Application/8C5B47AC-CD3D-4AA6-ACDD-990867531E87/Smoney.app/www/settings.html. Origin null is not allowed by Access-Control-Allow-Origin.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org