-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
origin is null for requests sent with window.fetch on WKWebView engine #897
Comments
This sounds like a wkwebview issue if it works with standard |
My wild guess is wkwebview is treating the request as a tainted origin, which I believe only does this on the https://fetch.spec.whatwg.org/#serializing-a-request-origin But I don't know what qualifies as a tainted origin... |
Managed to workaround that by using https://github.com/aporat/cordova-plugin-fetch Still would love to figure out the cause when get a chance, but the fetch plugin by @aporat would do it for now. |
Same problem when the axios is used. |
same problem here with axios as well, occurs only with cordova-ios v > 6:
Not reproduced with cordova-ios 5.1.1, the |
in |
Same problem when the axios is used. |
Here are some links that may or may not be relevant for this issue:
I am not sure what the proper fix is on the app side, I chose to enable (preflight) cors requests from the |
Issue Type
Description
I'm attempting to upgrade cordova-ios from 5.1.1 to 6.0.0 for a project. At the same time, I'm also trying to migrate from uiwebview to wkwebview since that's the new default. And uiwebview is going to be deprecated anyways.
Following the release note, I've managed to get the standard xhr working by setting the
scheme
andhostname
preferences in config.xmlHowever the requests sent with window.fetch still have the origin set to null despite the custom scheme configuration.
Is that the expected behavior, and I will have to migrate to some other plugin to replace the window.fetch functionality? Is there something else that I'm missing?
The text was updated successfully, but these errors were encountered: