File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,13 @@ async function render(panel: vscode.WebviewPanel, rootPath: string) {
6464 // set CSP (content security policy) to grant permission to local files
6565 const cspMeta : HTMLMetaElement = document . createElement ( 'meta' )
6666 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 ( ' ' )
67+ cspMeta . content =
68+ [
69+ `font-src ${ panel . webview . cspSource } http: https: data:` ,
70+ `img-src ${ panel . webview . cspSource } https:` ,
71+ `script-src ${ nonces . map ( nonce => `'nonce-${ nonce } '` ) . join ( ' ' ) } data:` ,
72+ `style-src ${ panel . webview . cspSource } https:` ,
73+ ] . join ( '; ' ) + ';'
7374 document . head . appendChild ( cspMeta )
7475
7576 // stringify dom
You can’t perform that action at this time.
0 commit comments