I want to allow PWAs to be able to request permission to bypass the same-origin policy after install #123
aarongustafson
started this conversation in
Wants
Replies: 1 comment
-
Love this idea. I've long been bothered that I cannot make a request in the browser that I can make in cURL. A trusted PWA should be free of this arbitrary constraint. UX artisan ⚡ illustrator ⚡ front-end engineer |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you wanted to create an RSS reader in the browser, it would not work because most RSS feeds do not use Cross-Origin Resource Sharing (CORS), thereby disallowing the web app to consume the RSS feed (a cross-origin resource). This is a necessary protection because without it, it would be possible for a user to visit example.com and have example.com make a request to their router at 192.168.1.1. The same-origin policy prevents this.
There are, however, legitimate use-cases for when the user might want to violate the same-origin policy. For example, the aforementioned RSS reader.
To work around the same-origin policy, a developer must do one of the following:
The first two options create a lot of friction for users, while the third option is an infrastructure burden on the app and violates the users' privacy since the proxy now is aware of all of the feeds a user subscribes to.
What if cross-origin requests were added as a permission that is gated by install? Installing a web app, should grant additional permissions similar to a native application; the user is explicitly granting trust to this application.
https://webwewant.fyi/wants/101/
Beta Was this translation helpful? Give feedback.
All reactions