We are developing a Windows 10 cordova app. As per our requirement we have added a Web View (<x-ms-webview id="id-web-view" height="100%" width="100%"></x-ms-webview>
) inside an HTML page and loading resources (HTML, JS, CSS etc) inside Web View from AppData\Local\Packages\LocalState directory. HTML, CSS, JS and other resources are loading perfectly fine.
We are not able make any AJX call from web View (embedded page). Getting Error- XMLHttpRequest: Network Error 0x80070005, Access is denied. AJAX calls are woring fine for parent HTML.
Seems its a CORS issue. I have tried various JQuery and other option to enable CORS. Its not working.
Any kind of help will be appreciated.
Customize the content security policy in the meta tag http-equiv="Content-Security-Policy" as needed. Add 'unsafe-inline' to default-src to enable inline JavaScript. For details, see go.microsoft.com/fwlink/?LinkID=617521 add meta tag http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"
Please visit http://taco.visualstudio.com/en-us/docs/cordova-security-whitlists/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With