Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6eaf21 commit 54d146eCopy full SHA for 54d146e
src/webview/render.ts
@@ -66,10 +66,12 @@ async function render(panel: vscode.WebviewPanel, rootPath: string) {
66
cspMeta.httpEquiv = 'Content-Security-Policy'
67
cspMeta.content =
68
[
69
+ `default-src 'self'`,
70
+ `connect-src https: http:`,
71
`font-src ${panel.webview.cspSource} http: https: data:`,
72
`img-src ${panel.webview.cspSource} https:`,
73
`script-src ${nonces.map(nonce => `'nonce-${nonce}'`).join(' ')} data:`,
- `style-src ${panel.webview.cspSource} https:`,
74
+ `style-src ${panel.webview.cspSource} https: 'self' 'unsafe-inline'`,
75
].join('; ') + ';'
76
document.head.appendChild(cspMeta)
77
0 commit comments