- From: Sam Denty <notifications@github.com>
- Date: Wed, 20 May 2020 12:36:31 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 20 May 2020 19:36:43 UTC
Currently the headers for a service-worker request don't contain any of the `Sec-*` values. [`Sec-Fetch-Dest`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest) & [`Sec-Fetch-Mode`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Mode) are the interesting ones. **Use case: Injecting code into web workers** Currently it's impossible to tell if request is going to be loaded as a web worker, without checking against a hardcoded path. With the `Sec-Fetch-Dest` header, you're able to differentiate between code loaded as a worker, or script. -- 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/1513
Received on Wednesday, 20 May 2020 19:36:43 UTC