-
-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Poll] do you use http or https? #90
Comments
Quick information: Web Extensions on Firefox run as if they were http (insecure) pages, so, according to my tests, without the popup trick those extensions would be incapable of using the library. |
@TexKiller, hmm, i think FF web extension should be considered secure? Perhaps it can work with a iframe solution if we just detect it? Current detection is: const secure = location.protocol === 'https:' ||
location.protocol === 'chrome-extension:' ||
location.hostname === 'localhost' Maybe it will work in some background file (if it's a extension) I don't know much about firefox extensions, perhaps it's possible to install the sw.js within a iframe or maybe it isn't I found one list of secure origins
And a chrome flag
|
according to this spec a popup like mine should be considered insecure? therefore i should not be able to install a sw.js? but if i added "noopener" to my
|
Oh, found something interesting in the spec 🙂
|
@jimmywarting, Web Extensions on Firefox run from the moz-extension protocol (in chrome they run from the chrome-extension protocol). In my tests I was incapable of getting a Service Worker to intercept any requests if it is created on an iframe there. I'll create an example extension and put here shortly. |
could you also test the |
Sure thing :) Steps to test it:
The included StreamSaver.js file is the same as in this repository, except for the following condition added to the secure context detection to make it run inside an iframe: |
While running this sample extension here on Firefox v65.0 everything goes well until after I click the button: when it is time to navigate to the "intercept-me-nr" URL and start the download the Github 404 page is shown instead of the download. You can modify the files on the extension folder and just reload the test page to try different things, if you want. |
I didn't know this After tinkering a lot with the Web Extension on Firefox I have found one way that works, but it involves the Shared Worker from PR #86 and some other tweaks. I can make a sample extension for it too, but it should take some more time since I have to clean up my test code. |
As the tile says:
Do you use StreamSaver.js on secure (https) or insecure (http) in production websites?
I'm just curious if folks are using StreamSaver's popup hack that is required by insecure pages. I could include google analytics on gihub pages but i'm not going to do that as i value everyones privacy
▼Vote with reaction▼
(you can choose both)
The text was updated successfully, but these errors were encountered: