observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

Serve sandbox document with secure context headers #532

Closed chrispahm closed 1 year ago

chrispahm commented 1 year ago

Is your feature request related to a problem? Please describe. I'd like to use WebR (the statistical language R compiled to WASM, https://github.com/georgestagg/webR) in an Observable notebook. The JS landscape is still lacking a solid statistical framework (see following discussion → https://talk.observablehq.com/t/observable-for-research-advanced-statistics/4538/1), and this could enable more researchers and data scientists to work with Observable notebooks. However, WebR makes use of SharedArrayBuffers, and therefore requires to be run in a secure context.

Describe the solution you'd like If possible, the sandbox document would be served including the following headers:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

Describe alternatives you've considered Unfortunately, there seems to be no other way to get WebR to work (see following issue in the WebR repo https://github.com/georgestagg/webR/issues/75).

Additional context Notebook (Ambassador account): https://observablehq.com/d/147d41043e6a52f2 Slack Discussion (Ambassador channel): https://observable-community.slack.com/archives/C048DNSCNDP/p1674638959702439

chrispahm commented 1 year ago

closed in favor of https://github.com/observablehq/feedback/issues/557

neocarto commented 1 year ago

Any news on this subject?