webassembly.sh icon indicating copy to clipboard operation
webassembly.sh copied to clipboard

Set cross-origin security headers to work with SharedArrayBuffers in FF 79

Open coolreader18 opened this issue 5 years ago • 5 comments

Firefox 79 recently released with support for SharedArrayBuffers, but you need to set certain headers in order to use them (docs). I'm not sure exactly how webassembly.sh is hosted, but I assume this wouldn't be too hard to implement?

coolreader18 avatar Jul 30 '20 15:07 coolreader18

And it would fix #79

HKalbasi avatar Aug 27 '20 06:08 HKalbasi

In firefox, yeah.

coolreader18 avatar Aug 28 '20 17:08 coolreader18

Just tested it on an instance I host myself, and on nginx it really is as easy as

location / {
    add_header Cross-Origin-Opener-Policy same-origin;
    add_header Cross-Origin-Embedder-Policy require-corp;
    # whatever you had here before
}

It even works perfectly in Chrome, I no longer have the annoying issue of having to use the prompt for stdin.

martindisch avatar Aug 18 '21 19:08 martindisch

@syrusakbary would you or someone else be able to look into this?

coolreader18 avatar Aug 18 '21 19:08 coolreader18

It even works perfectly in Chrome, I no longer have the annoying issue of having to use the prompt for stdin.

Hit that issue as well in Chrome 93 running the following on webassembly.sh but sounds like it will effect most packages using std io.

rajsite avatar Sep 05 '21 23:09 rajsite