[
https://issues.apache.org/jira/browse/CB-10143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17249513#comment-17249513
]
Kavya commented on CB-10143:
----------------------------
"cordova-plugin-wkwebview-file-xhr" plugin is not working with ajax post calls
and the post calls are converted as blob requests.
All the ajax calls are getting invoked using xhr-polyfill.js file where the
post calls are failing and also I am getting a security error that the
certificates are not valid for those post calls.
Can someone please help me with the solution?
> Local file:// url XmlHttpRequests are not allowed in WKWebViewEngine
> --------------------------------------------------------------------
>
> Key: CB-10143
> URL: https://issues.apache.org/jira/browse/CB-10143
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-plugin-wkwebview-engine
> Reporter: Shazron Abdullah
> Priority: Major
> Labels: wkwebview-baked-in, wkwebview-known-issues
>
> mobile-spec failure in XMLHttpRequest.spec.4 is a known WKWebView issue,
> where CORS is now respected and cannot load files from file:// urls, only
> http*:// urls are allowed.
> With CSP off to rule things out:
> XHR to yourself of course works, but doesn't really make sense for
> real-world use. XHR to a sibling file, parent file, or any child file
> results in the error ""Cross origin requests are only supported for
> HTTP”.
> To illustrate:
> {code}
> |
> parent.xml
> |
> www
> |---- index.html (file currently loaded)
> |---- sibling.xml
> |---- child-folder
> | |---- child.xml
> {code}
> index.html is the currently loaded file in the WebView. From it, you
> can't load parent.xml, sibling.xml nor child.xml using XHR according
> to my tests.
> The workaround is implementing CB-10109
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]