Skip to content
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

add --coop option to enable cross-origin isolated #806

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vapier
Copy link

@vapier vapier commented Apr 17, 2022

In order to utilize some web features like SharedArrayBuffer via
localhost, COOP & COEP headers have to be set. Add an --coop
option to let people easily opt-in to them. These are important
for things like WebAssembly testing.

More information can be found at:
https://web.dev/cross-origin-isolation-guide/

Contributor checklist
  • Provide tests for the changes (unless documentation-only)
  • Documented any new features, CLI switches, etc. (if applicable)
    • Server --help output
    • README.md
    • doc/http-server.1 (use the same format as other entries)
  • The pull request is being made against the master branch
Maintainer checklist
  • Assign a version triage tag
  • Approve tests if applicable

In order to utilize some web features like SharedArrayBuffer via
localhost, COOP & COEP headers have to be set.  Add an --coop
option to let people easily opt-in to them.  These are important
for things like WebAssembly testing.

More information can be found at:
https://web.dev/cross-origin-isolation-guide/
@vapier
Copy link
Author

vapier commented Aug 11, 2022

Fixes #650

@PoignardAzur
Copy link

For what it's worth, I would really like this option as well. Not being able to enable cross-origin isolation, and therefore wasm threads, was a dealbreaker for me, and made me replace htttp-server with a bespoke solution. I'd really like if something like this was merged.

@JakobGue
Copy link

Please merge! This would be so helpful.

@liudonghua123
Copy link

It's the same as #759. Please merge! I want to use SharedArrayBuffer, and they are required headers.

See also https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants