Skip to content

Commit

Permalink
chore(webview): tighten CSP to account for postMessage() use
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantinos Maninakis <maninak@protonmail.com>
  • Loading branch information
maninak committed Dec 13, 2023
1 parent b33937f commit 0952def
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/helpers/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export function createOrShowWebview(ctx: ExtensionContext, title = 'Patch DEADBE
style-src ${allowedSource} 'unsafe-inline';
img-src ${allowedSource} https: data:;
script-src 'strict-dynamic' 'nonce-${nonce}' 'unsafe-inline' https:;
Cross-Origin-Opener-Policy: same-origin;
Cross-Origin-Embedder-Policy: require-corp;
"
>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand Down

0 comments on commit 0952def

Please sign in to comment.