Unfortunately, it's not possible to set arbitrary headers on a Cloud Storage bucket, at least by following these instructions: Set CORS configuration on a bucket. There's no option to set the Cross-Origin-Resource-Policy header to cross-origin, only the access-control-allow-origin header (AFAICT).
We could proxy requests for these files through dart-services and provide the necessary headers to the response.
We need to make sure our firebase hosting configuration and any important endpoints return the correct CORS headers in order to use SharedArrayBuffer.
To test with Wasm locally, you can set these headers using
dhttpd
:These headers will also need to be configured in our firebase hosting configuration.
We also need to set the
Cross-Origin-Resource-Policy
header tocross-origin
for these two files:Unfortunately, it's not possible to set arbitrary headers on a Cloud Storage bucket, at least by following these instructions: Set CORS configuration on a bucket. There's no option to set the
Cross-Origin-Resource-Policy
header tocross-origin
, only theaccess-control-allow-origin
header (AFAICT).We could proxy requests for these files through dart-services and provide the necessary headers to the response.