Skip to content

Commit

Permalink
Docs: COOP/COEP headers clarification (#61)
Browse files Browse the repository at this point in the history
The worker script should also serve these headers.
  • Loading branch information
kleisauke committed Jan 13, 2024
1 parent 65f364d commit dcbbab1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ yarn add wasm-vips
### Browser

Requires `vips.js`, `vips.wasm` and `vips.worker.js` to be served from
the same directory.
the same directory. Additionally, when using ES6 modules, it's necessary
to also serve the `vips-es6.js` and `vips-es6.worker.js` files.

Since wasm-vips requires [the `SharedArrayBuffer` API](
https://caniuse.com/sharedarraybuffer), the website needs to opt-in to
a cross-origin isolated state, by serving the following HTTP headers on
the main document:
both the main document and worker script (`*.worker.js`):

```http
Cross-Origin-Embedder-Policy: require-corp
Expand Down

0 comments on commit dcbbab1

Please sign in to comment.