ionic-team / ionic-team/capacitor
feat: send Referer header on ios
- Dominant language
- TypeScript
- Stars
- 16.7k
- Forks
- 1.3k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 10
Description
## Feature Request
### Description
Hello, I am using a service that secures web apps using the HTTP Referer header. This service does allow the capacitor:// scheme which is default on iOS. I am having an issue were capacitor on iOS is not sending the header, even though it does send the Origin header and other headers. The service offers a js npm module which uses XMLHttpRequest. I am not having issues on Android.
### Platform(s)
iOS
### Preferred Solution
Add the HTTP Referer header to XMLHttpRequests.
### Alternatives
Overriding XMLHttpRequest to inject the header. (Haven't tried it, yet.)
### Additional Context
Attached safari debugger and found this:
```
GET /path HTTP/1.1
Accept: /
Origin: capacitor://localhost
Host: host.name.com
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
Accept-Language: en-us
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
```
Contributor guide
Assessment
This issue has not been assessed yet.