jimmywarting / StreamSaver.js

StreamSaver writes stream to the filesystem directly asynchronous
https://jimmywarting.github.io/StreamSaver.js/example.html
MIT License
3.98k stars 413 forks source link

Receive no message when mitm.html hosted at an insecure site #131

Closed brynne8 closed 4 years ago

brynne8 commented 4 years ago

As my website is in local network with no connection to Internet, I have to host mitm.html as well as sw.js on my server. I changed the links to point to my server addess.

It worked fine when I debug locally with 'http://localhost:1234', but when I use 'http://192.168.XXX.XXX:1234', the channel.port1.onmessage seemed not called.

I wonder if MessageChannel or stream couldn't be used in insecure website. Is there a way to work around this?

jimmywarting commented 4 years ago

when you use an ip address instead of localhost then the web context is considered insecure (unless you use https)

you have 4 options: