Re: [w3c/ServiceWorker] Should mixed content always be blocked? (#813)

> To be clear, for future readers, we ended up always blocking mixed content in service workers.

I'm not sure that is 100% clear.

What does 'in service workers' actually mean?

Does it restrict requests made TO service workers (ie from fetch() calls on the main thread, or web workers)? Or, does it only restrict requests made BY service workers to the network using fetch() (or cache.add() etc)?

I'm currently battling a problem where the main thread is requesting something via http and I was hoping to use a service worker to rewrite the request to https; and then add() that to a cache, but I get the `Mixed Content` message.

I can't get my head around any reason for this. I can see that requests made *to the network* from anywhere (main thread, web workers, service workers) would be subject to this, but why is there a restriction to requests made *to the service worker*? I was operating under the assumption that the channel between the main thread and service worker was trusted.

Perhaps there isn't and I'm wrong about this. In case anyone was wondering, I'm happily corrected. If this isn't an appropriate place to ask, I'll happily delete.

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

Message ID: <w3c/ServiceWorker/issues/813/1047503787@github.com>

Received on Tuesday, 22 February 2022 07:34:57 UTC