Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vs/workbench/common/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const webviewResourceBaseHost = 'vscode-cdn.net';

export const webviewRootResourceAuthority = `vscode-resource.${webviewResourceBaseHost}`;

export const webviewGenericCspSource = `https://*.${webviewResourceBaseHost}`;
export const webviewGenericCspSource = `'self' https://*.${webviewResourceBaseHost}`;

/**
* Construct a uri that can load resources inside a webview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ sw.addEventListener('fetch', (event) => {
}

// If we're making a request against the remote authority, we want to go
// back through VS Code itself so that we are authenticated properly
if (requestUrl.host === remoteAuthority) {
// through VS Code itself so that we are authenticated properly. If the
// service worker is hosted on the same origin we will have cookies and
// authentication will not be an issue.
if (requestUrl.origin !== sw.origin && requestUrl.host === remoteAuthority) {
switch (event.request.method) {
case 'GET':
case 'HEAD':
Expand Down