Re: [w3c/ServiceWorker] Pass credentials on navigator.serviceWorker.register("/service_worker.js"); (#1399)

It is same origin but for my case there's a load balancer with auth that looks for credential cookie. 

Previously my fetch to manifest `<link rel="manifest" href="manifest.json" />` doesn't have this credential cookie either (and I think there was a pre-flight OPTIONS?). 

Since there's no credential cookie my LB responds with `text/html` error page and the fetch fails (Chrome also does CORB for `text/html` mime). To get around it I specified crossorigin="use-credentials" and I can see in the network tab that `<link rel="manifest" crossorigin="use-credentials" href="manifest.json" />` now includes the cookie and the call can go through.

Now I'm hitting the same roadblock with `navigator.serviceWorker.register("/service_worker.js");` and the request just stays at `Pending`. I believe this is also the same issue with edge in this link https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/17360912/, except theirs look for Authorization header.

BTW a day later I'm now seeing Chrome not showing the `service_worker.js` call in the network tab but see a failed install in the Application tab and `Service worker does not have the 'fetch' handler` warning. Chrome Canary still shows the service_worker.js request.

-- 
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/1399#issuecomment-480308715

Received on Friday, 5 April 2019 15:01:56 UTC