StreamSaver.js icon indicating copy to clipboard operation
StreamSaver.js copied to clipboard

File cannot be loaded with unsecured connection, when serviceWorker does not exist

Open alex327512 opened this issue 2 years ago • 1 comments

Hi everyone,

I found a case when the file cannot be loaded. It happens when the connection is unsecured (local environment, but it's not localhost). In this case popup just opens once.

Removing isSecureContext in the condition below helped, but it caused the error (The file at link was loaded over an insecure connection. This file should be served over HTTPS.) if (isSecureContext && !('serviceWorker' in navigator))

Seems like it's not a good solution as well as forcing opening Iframe instead of popup. Are there any other possible solutions?

Many thanks!

alex327512 avatar Sep 09 '23 17:09 alex327512

I encounter this problem too, I guess it just doesn't work when your connection is not over https (except localhost) , as both popup and iframe approach need serviceWorker to hijack request.

daolanfler avatar Jul 23 '24 08:07 daolanfler