We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent850830b commit1b806b6Copy full SHA for 1b806b6
src/webview/render.ts
@@ -64,12 +64,13 @@ async function render(panel: vscode.WebviewPanel, rootPath: string) {
64
// set CSP (content security policy) to grant permission to local files
65
constcspMeta:HTMLMetaElement=document.createElement('meta')
66
cspMeta.httpEquiv='Content-Security-Policy'
67
-cspMeta.content=[
68
-`font-src${panel.webview.cspSource} http: https: data:;`,
69
-`img-src${panel.webview.cspSource} https:;`,
70
-`script-src${nonces.map(nonce=>`'nonce-${nonce}'`).join(' ')};`,
71
-`style-src${panel.webview.cspSource} https:;`,
72
-].join(' ')
+cspMeta.content=
+[
+`font-src${panel.webview.cspSource} http: https: data:`,
+`img-src${panel.webview.cspSource} https:`,
+`script-src${nonces.map(nonce=>`'nonce-${nonce}'`).join(' ')} data:`,
+`style-src${panel.webview.cspSource} https:`,
73
+].join('; ')+';'
74
document.head.appendChild(cspMeta)
75
76
// stringify dom