-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
SW: Add secure headers and clean up #24217
Conversation
I'm testing it here: https://rawcdn.githack.com/LeviPesin/three.js-1/a0f8cbd345e98f3e9ecf3fc1bf922add84d98905/editor/index.html It isn't working for me.
The trace points to this line: Perhaps there is some additional code from coi-serviceworker that should be copied over. |
Should be fixed now. |
It seems that unpkg does not provide CORP header, so we cannot use |
But it still does not work... I am unsure why. |
In my case mattrossman@bc818a7 I had to copy the two libs (ffmpeg.wasm and es-module-shims) from unpkg locally. Working demo. |
I think @mrdoob should decide should we keep these libs locally, investigate ways to enable the SW to work with cross-origin requests, or just use a non-SharedArrayBuffer version. |
Is the non-SharedArrayBuffer version 10x slower or something? 🤔 |
I think it is exactly number-of-coresX slower, because SharedArrayBuffer allows multithreading. I think we can actually keep the libs like we do with the other libs? |
Alright, lets host the libraries then 👍 |
Done. |
Is there something preventing merging this PR? |
@mrdoob Can this PR be merged, please? |
Sorry for the delay! |
Thanks! |
Fixes #24212
Description
Add the required secure headers to the editor's service worker and clean up it.
@mattrossman Please confirm this works.