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 fa1e1fa commit b85a272Copy full SHA for b85a272
src/vs/workbench/api/common/extHostWebview.ts
@@ -78,7 +78,12 @@ export class ExtHostWebview implements vscode.Webview {
78
if (extensionLocation.scheme === Schemas.https || extensionLocation.scheme === Schemas.http) {
79
// The extension is being served up from a CDN.
80
// Also include the CDN in the default csp.
81
- return extensionLocation + ' ' + webviewGenericCspSource;
+ let extensionCspRule = extensionLocation.toString();
82
+ if (!extensionCspRule.endsWith('/')) {
83
+ // Always treat the location as a directory so that we allow all content under it
84
+ extensionCspRule += '/';
85
+ }
86
+ return extensionCspRule + ' ' + webviewGenericCspSource;
87
}
88
return webviewGenericCspSource;
89
0 commit comments