Merge pull request #4131 from cdr/jsjoeio-fix-csp

fix(lib/vscode): update csp in webview to allow ports
This commit is contained in:
Joe Previte 2021-09-10 17:45:26 +00:00 committed by GitHub
commit bc3acb071e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,10 @@ export const webviewResourceBaseHost = 'vscode-webview.net';
export const webviewRootResourceAuthority = `vscode-resource.${webviewResourceBaseHost}`;
export const webviewGenericCspSource = `https://*.${webviewResourceBaseHost}`;
// NOTE@coder: This is a temporary change to include ":*"
// due to the patch we had to make for webview resources.
// See PR#3895 and https://github.com/cdr/code-server/issues/3936 for more details.
export const webviewGenericCspSource = `https://*.${webviewResourceBaseHost}:*`;
/**
* Construct a uri that can load resources inside a webview