I am building an application with cordova and Ionic for Windows UWP. When I run this code
this.http.post('htpp://myDomain.com/path/', data).toPromise().then(() => { ... });
It enters in the catch clause returning a response with 0 status.
I get this warning too, I don't know if it's related :
CONSOLE21301: serviceWorker.getRegistrations is rejected due to unsecure context or host restriction in ms-appx-web://microsoft.microsoftedge/assets/errorpages/dnserror.html?ErrorStatus=0x800C0005
My hosts file
127.0.0.1 localhost myDomain.com
Has someone an idea to fix this ?
Thanks By advance
I finally found !
running this command allows the uwp app to run requests to local servers !
CheckNetIsolation.exe LoopbackExempt -a -n="[app PackageFullName]"
User contributions licensed under CC BY-SA 3.0