Re: [w3c/ServiceWorker] Service-Worker-Allowed can be cross-origin to the script URL. (#1307)

@mattto We tripped into a similar issue, however, in our case everything was on the same origin. When doing,

    navigator.serviceWorker.register("/js/sw.js", { scope: "/" })

This failed with the error `Failed to register a ServiceWorker: The path of the provided scope...`

The fix is to add the `Service-Worker-Allowed` header seems to trip up quite a few people. Is there any reason to add this header if the request is **not** cross-origin?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1307#issuecomment-465930996

Received on Thursday, 21 February 2019 09:42:20 UTC