mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Include preview roots in list of allowed markdown preview csp roots
Fixes #249321
This commit is contained in:
@@ -428,7 +428,13 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
|
||||
}
|
||||
|
||||
get cspSource() {
|
||||
return this._webviewPanel.webview.cspSource;
|
||||
return [
|
||||
this._webviewPanel.webview.cspSource,
|
||||
...this._contributionProvider.contributions.previewResourceRoots.map(root => {
|
||||
const dirRoot = root.path.endsWith('/') ? root : root.with({ path: root.path + '/' });
|
||||
return dirRoot.toString();
|
||||
}),
|
||||
].join(' ');
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
Reference in New Issue
Block a user