Allow setting COOP and COEP headers in Github Pages #13309
Replies: 12 comments 16 replies
-
I want this too ... |
Beta Was this translation helpful? Give feedback.
-
For people who want a quick and very hacky workaround, include this script in your https://github.com/josephrocca/clip-image-sorter/blob/main/enable-threads.js (Note: You can't paste it inline - it needs to be in a separate script file and imported like |
Beta Was this translation helpful? Give feedback.
-
@josephrocca my app is already using an own service worker which would conflict with the one you proposed... I also already tricked it to overwrite the headers ... nonetheless this feels still very hacky ... would prefer a straight forward solution where github would offer to allow to enable us COOP and COEP headers. Your script is interesting, mine for example did not consider |
Beta Was this translation helpful? Give feedback.
-
Any thoughts as to whether something akin to Netlify's header specification could be added? The lack of being able to address Cross-Origin-Opener-Policy (COOP) and Cross-Origin-Embedder-Policy (COEP) on a pro-developer portal is surprising. |
Beta Was this translation helpful? Give feedback.
-
Hello, This is a scenario we would support with custom headers. No ETA at the moment as to when this feature will be available. |
Beta Was this translation helpful? Give feedback.
-
Use netlify |
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
-
Would be nice for Godot HTML5 export ! |
Beta Was this translation helpful? Give feedback.
-
Any update on this ? I'm attempting to setup a github page with wasm+sqlite, I'll share here if the workarounds mentioned in this thread are still working or not. |
Beta Was this translation helpful? Give feedback.
-
Any updates? I want to publish a wasm example from my repository but i'm limited by this. |
Beta Was this translation helpful? Give feedback.
-
Working on a data vis project that would greatly benefit from this! Mostly in response times, ehe. |
Beta Was this translation helpful? Give feedback.
-
I would also greatly appreciate that for my WASM demos hosted on Github pages (e.g. https://floooh.github.io/sokol-html5/ or https://floooh.github.io/visualz80remix/), IMHO not being able to control COOP/COEP headers on simple web hosting services like Github is the one thing that's holding back WASM threading. |
Beta Was this translation helpful? Give feedback.
-
In order to use
SharedArrayBuffer
and WebAssembly Threads, COOP and COEP headers need to be set, such that the page becomes cross-origin isolated (explanation at web.dev). Since Wasm is becoming well supported across browsers, many libraries (e.g. image editing, ML) and applications are starting to use it, and so the inability to set these headers in Github Pages is becoming a bigger and bigger problem (for me, at least).Note that there are hacky workarounds, like this: https://github.com/gzuidhof/coi-serviceworker But these can cause a bunch of other problems. I think the emergence of libraries like that (which explicitly mention Github Pages in their README) is evidence enough that this feature should be added.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions