You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Peter Hoyer (JIRA)" <ji...@apache.org> on 2017/05/01 20:38:04 UTC

[jira] [Comment Edited] (CB-12688) XHR to local network with CSP ms-appx works on phone but not on PC (Windows 10 UWP)

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

Peter Hoyer edited comment on CB-12688 at 5/1/17 8:37 PM:
----------------------------------------------------------

<platform name="windows">
 <config-file target="package.appxmanifest" parent="/Package/Capabilities">
 <Capability Name="privateNetworkClientServer" />
 </config-file>
 </platform>

"privateNetworkClientServer" privilege on Windows 10 will actually only be banned for context ms-appx-web and so for ms-appx this is the solution.

In any case, that fact that this works fine on mobile without "privateNetworkClientServer" is a bug or ptherwise a feature which should be aligned with the PC version.


was (Author: peterhoyer):
It does pass and what described in my commentis actually the solution: "privateNetworkClientServer" will actually only be banned for context ms-appx-web.

In any case, that fact that this works fine on mobile without "privateNetworkClientServer" is a bug or ptherwise a feature which should be aligned with the PC version.

> XHR to local network with CSP ms-appx works on phone but not on PC (Windows 10 UWP)
> -----------------------------------------------------------------------------------
>
>                 Key: CB-12688
>                 URL: https://issues.apache.org/jira/browse/CB-12688
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Windows
>    Affects Versions: 4.3.2
>         Environment: Cordova version is 6.2.0, PC Windows version is 10.0.14393 on x64.
>            Reporter: Peter Hoyer
>              Labels: windows
>
> In a Cordova-based app I need to send XMLHttpRequest requests to a destination in the local network. Following  https://github.com/apache/cordova-windows/blob/master/cordova-windows10.md I have set the policy:
> <platform name="windows">
>      <preference name="WindowsDefaultUriPrefix" value="ms-appx://"/>
>  </platform>
> In the Cordova build file. Local network access now works fine on the phone, but not on the PC. Although the PC correctly uses the URL base ms-appx:// (to check I build a version causing a crash and WRE reports the correct URI base), all local requests receive ready state 4 and status 0.
> I have made sure that there are neither access nor allow-navigation policies in the xml file.
> Cordova version is 6.2.0, PC Windows version is 10.0.14393 on x64.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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