Skip to content

Commit

Permalink
[dds] Add cross-origin-resource-policy to DevTools server to enable W…
Browse files Browse the repository at this point in the history
…ASM when embedded

See flutter/devtools#7856 (comment)

Change-Id: If9d19eef8f8475e3dddb70db55e6b72e0ceb6f08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374945
Reviewed-by: Kenzie Davisson <[email protected]>
Reviewed-by: Ben Konyi <[email protected]>
Commit-Queue: Ben Konyi <[email protected]>
  • Loading branch information
DanTup authored and Commit Queue committed Jul 11, 2024
1 parent 3b62508 commit ae6ed09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/dds/lib/devtools_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ class DevToolsServer {
// Add the headers required to serve with wasm.
server.defaultResponseHeaders
..add('Cross-Origin-Embedder-Policy', 'credentialless')
..add('Cross-Origin-Opener-Policy', 'same-origin');
..add('Cross-Origin-Opener-Policy', 'same-origin')
..add('Cross-Origin-Resource-Policy', 'cross-origin');

// Serve requests in an error zone to prevent failures
// when running from another error zone.
Expand Down

0 comments on commit ae6ed09

Please sign in to comment.