Created by: darthmaim
This PR adds the http header Service-Worker: script
to the checkValidServiceWorker
request in both serviceWorker templates, to match the spec on how to request a service worker.
See https://w3c.github.io/ServiceWorker/#update-algorithm:
To perform the fetch given request, run the following steps:
- Append
Service-Worker
/script
to request’s header list.
And https://w3c.github.io/ServiceWorker/#service-worker-script-request:
An HTTP request to fetch a service worker's script resource will include the following header:
Service-Worker
Indicates this request is a service worker's script resource request.