origin is null for requests sent with window.fetch on WKWebView engine
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 1k
- Avg merge
- 12h 11m
- Merged PRs (30d)
- 18
Description
### Issue Type
- [ ] Bug Report
- [ ] Feature Request
- [x] Support Question
## 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` and `hostname` preferences in config.xml
However 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?
Contributor guide
Research direction
Start by reproducing the window.fetch behavior in a Cordova iOS project using WKWebView, with the scheme and hostname preferences set in config.xml. Compare its request origin with standard XHR and determine whether the null origin is expected or requires a documented change; the issue does not name a source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100