[w3c/ServiceWorker] Is there a way to know if a <script>'s fetch request has an integrity attribute? (#1507)

Imagine a service worker that intercepts JS requests, passes it to a JS optimization service, then returns the optimized response (Disregard the fact that this would be really slow). If the script tag that spawned this request has the `integrity` attribute, the response would be rejected, right? Because the hash of the optimized js would differ from the original JS.

The `integrity` property in the fetch event always seems to be an empty string. Is there a way to know if a <script>'s fetch request has an integrity attribute?

-- 
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/1507

Received on Friday, 13 March 2020 03:27:20 UTC