Skip to content

Commit

Permalink
Update CSP to allow replays to play in release builds (#612)
Browse files Browse the repository at this point in the history
This PR updates CSP used for the IDE panel. This is needed for replays
to work, as the built-in player streams the video over http, we need to
allow for this.

The issue wasn't detected with non-release builds before as we use
different CSP settings there that are much more permissive in order to
allow for things like hot reload.

## Test plan

Try out replays on release build
  • Loading branch information
kmagiera authored Oct 11, 2024
1 parent 858c56c commit d39f062
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function generateWebviewContent(
<meta http-equiv="Content-Security-Policy"
content="default-src 'none';
img-src vscode-resource: http: https: data:;
media-src vscode-resource: http: https:;
style-src ${webview.cspSource} 'unsafe-inline';
script-src 'nonce-${nonce}';
font-src vscode-resource: https:;" />
Expand Down

0 comments on commit d39f062

Please sign in to comment.