Skip to content

Commit

Permalink
Merge pull request #392 from wasmerio/ffmpeg-coi
Browse files Browse the repository at this point in the history
Make sure `static-web-server` enables Cross-Origin Isolation headers for the ffmpeg react demo
  • Loading branch information
Michael Bryan authored Jan 3, 2024
2 parents 8c551ac + 2b331d3 commit 728baf9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/ffmpeg-react/etc/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Configuration for static-web-server.
# https://static-web-server.net/configuration/config-file/

[general]
log-level = "info"

[advanced]

# Note: We need COOP and COEP for Cross-Origin Isolation
# https://docs.wasmer.io/javascript-sdk/explainers/troubleshooting#sharedarraybuffer-and-cross-origin-isolation
[[advanced.headers]]
source = "**/*.{js,html,wasm}"
headers = { Cross-Origin-Opener-Policy = "same-origin", Cross-Origin-Embedder-Policy = "require-corp" }
[[advanced.headers]]
source = "/"
headers = { Cross-Origin-Opener-Policy = "same-origin", Cross-Origin-Embedder-Policy = "require-corp" }
1 change: 1 addition & 0 deletions examples/ffmpeg-react/wasmer.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ description = "wasmer-examples/ffmpeg-react website"

[fs]
"/public" = "./dist"
"/etc/static-web-server" = "etc"

0 comments on commit 728baf9

Please sign in to comment.