Skip to content
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

registerForeignFetch({ origins, scope }) optional #982

Closed
DanielHerr opened this issue Sep 27, 2016 · 6 comments
Closed

registerForeignFetch({ origins, scope }) optional #982

DanielHerr opened this issue Sep 27, 2016 · 6 comments

Comments

@DanielHerr
Copy link

The foreign fetch scopes and origins should be optional. This wouldnt be a security concern because the SW is already explicitly intending to handle foreign fetches.

@jakearchibald
Copy link
Contributor

I'm in favour of removing this part of the API. As you say, it's explicit in the event handler, and adding an additional level of scoping seems confusing.

@mkruisselbrink - am I missing something about this API?

@annevk
Copy link
Member

annevk commented Sep 29, 2016

Well, we wanted to keep the model that CORS has around to some extent. CORS requires an origin.

@jakearchibald
Copy link
Contributor

You already have to provide the origin in the response. It kinda feels redundant in registerForeignFetch.

@annevk
Copy link
Member

annevk commented Sep 29, 2016

Although currently origin is not required there (there being respondWith()), I guess that's a bug. Agreed that it could have a sensible default here.

@jakearchibald
Copy link
Contributor

If you don't provide an origin, the returned response is always opaque.

@jakearchibald
Copy link
Contributor

Closing due to removing foreign fetch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants