Throuble with using SharedArrayBuffer with third party JS

370 Views Asked by At

I add respone header ("Cross-Origin-Opener-Policy", "same-origin") to use SharedArrayBuffer (to support webassembly). But now I have trouble with adding third party JS in my page, which will be blocked by cross-origin isolated. Any work around method to use third party JS with webassembly ?

1

There are 1 best solutions below

0
On

Did you set only CORP or COEP as well?

If you set COEP to require-corp, your script will have to explicitly grant permission using I think the script you are trying to load will have to set CORP to cross-origin

You could also try to set Access-Control-Allow-Origin I am not sure if it will override the behavior of the.

CORP protects your resources from being loaded from another origin cross-origin isolation headers, so it should not prevent you from loading scripts (I think).