-
Notifications
You must be signed in to change notification settings - Fork 341
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
Dispatch to foreign fetch for redirects #362
Comments
annevk
added a commit
that referenced
this issue
Aug 10, 2016
This commit makes the following changes: * Moves 401 and 407 handling into the network realm. That way 401 and 407 responses from service worker just surface at the API level rather than potentially triggering new network activity. * That means only responses with redirect statuses have special semantics when they come from a service worker. * Only when redirects are automatically followed should we set the skip-service-worker flag, otherwise we negatively affect navigations. (Note #362 for follow up work regarding foreign fetch, which is still somewhat broken.) * This also removes the requirement that a 407 abides by the CORS protocol, which was not entirely sensical. * It makes various editorial corrections, for which I apologize as in retrospect they make this harder to review. Fixes #363 and fixes w3c/ServiceWorker#793.
This should be quite a bit easier now thanks to #363. |
Just to clarify. Would this mean that a 30X redirect on any subresource HTTP request would trigger the service worker of the target URL and dispatch a foreign fetch event? |
No, only requests that are cross-origin, but same-origin with a foreign-fetch service worker. Same-origin we cannot expose without some kind of server-side opt-in. |
jakearchibald
added a commit
that referenced
this issue
Dec 15, 2016
jakearchibald
added a commit
that referenced
this issue
Jan 10, 2017
jakearchibald
added a commit
that referenced
this issue
Feb 14, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently we set the skip-service-worker flag so a new location of a redirect does not get intercepted by a same-origin service worker. However, a cross-origin service worker should likely intercept that, otherwise we make service migration harder.
See w3c/ServiceWorker#793 for context.
@mkruisselbrink will fix this (and will soon be able to assign himself).
The text was updated successfully, but these errors were encountered: