Skip to content

Commit a3e739f

Browse files
committed
update cdn domain for webview
1 parent 216dea5 commit a3e739f

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-oss-dev",
33
"version": "1.66.0",
4-
"distro": "caf9297a0db36a7c5cd5c52fcd7f19791bab5eca",
4+
"distro": "d8a2548202ac4d5c7846f4c7ee4aac9a0c339217",
55
"author": {
66
"name": "Microsoft Corporation"
77
},
@@ -231,4 +231,4 @@
231231
"elliptic": "^6.5.3",
232232
"nwmatcher": "^1.4.4"
233233
}
234-
}
234+
}

product.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"licenseFileName": "LICENSE.txt",
2828
"reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
2929
"urlProtocol": "code-oss",
30-
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-webview.net/insider/181b43c0e2949e36ecb623d8cc6de29d4fa2bae8/out/vs/workbench/contrib/webview/browser/pre/",
30+
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/181b43c0e2949e36ecb623d8cc6de29d4fa2bae8/out/vs/workbench/contrib/webview/browser/pre/",
3131
"builtInExtensions": [
3232
{
3333
"name": "ms-vscode.references-view",

src/vs/server/node/webClientServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export class WebClientServer {
304304
'media-src \'self\';',
305305
`script-src 'self' 'unsafe-eval' ${this._getScriptCspHashes(data).join(' ')} 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' http://${remoteAuthority};`, // the sha is the same as in src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
306306
'child-src \'self\';',
307-
`frame-src 'self' https://*.vscode-webview.net data:;`,
307+
`frame-src 'self' https://*.vscode-cdn.net data:;`,
308308
'worker-src \'self\' data:;',
309309
'style-src \'self\' \'unsafe-inline\';',
310310
'connect-src \'self\' ws: wss: https:;',

src/vs/workbench/api/test/browser/extHostWebview.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ suite('ExtHostWebview', () => {
133133
const webviewUri = webview.webview.asWebviewUri(sourceUri);
134134
assert.strictEqual(
135135
webviewUri.toString(),
136-
`https://vscode-remote%2Bssh-002dremote-002blocalhost-003dfoo-002fbar.vscode-resource.vscode-webview.net/Users/cody/x.png`,
136+
`https://vscode-remote%2Bssh-002dremote-002blocalhost-003dfoo-002fbar.vscode-resource.vscode-cdn.net/Users/cody/x.png`,
137137
'Check transform');
138138

139139
assert.strictEqual(
140140
decodeAuthority(webviewUri.authority),
141-
`vscode-remote+${authority}.vscode-resource.vscode-webview.net`,
141+
`vscode-remote+${authority}.vscode-resource.vscode-cdn.net`,
142142
'Check decoded authority'
143143
);
144144
});
@@ -156,12 +156,12 @@ suite('ExtHostWebview', () => {
156156
const webviewUri = webview.webview.asWebviewUri(sourceUri);
157157
assert.strictEqual(
158158
webviewUri.toString(),
159-
`https://vscode-remote%2Blocalhost-003a8080.vscode-resource.vscode-webview.net/Users/cody/x.png`,
159+
`https://vscode-remote%2Blocalhost-003a8080.vscode-resource.vscode-cdn.net/Users/cody/x.png`,
160160
'Check transform');
161161

162162
assert.strictEqual(
163163
decodeAuthority(webviewUri.authority),
164-
`vscode-remote+${authority}.vscode-resource.vscode-webview.net`,
164+
`vscode-remote+${authority}.vscode-resource.vscode-cdn.net`,
165165
'Check decoded authority'
166166
);
167167
});

src/vs/workbench/common/webview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface WebviewRemoteInfo {
1818
* This is hardcoded because we never expect to actually hit it. Instead these requests
1919
* should always go to a service worker.
2020
*/
21-
export const webviewResourceBaseHost = 'vscode-webview.net';
21+
export const webviewResourceBaseHost = 'vscode-cdn.net';
2222

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

@@ -31,7 +31,7 @@ export const webviewGenericCspSource = `https://*.${webviewResourceBaseHost}`;
3131
* we know where to load the resource from (remote or truly local):
3232
*
3333
* ```txt
34-
* ${scheme}+${resource-authority}.vscode-resource.vscode-webview.net/${path}
34+
* ${scheme}+${resource-authority}.vscode-resource.vscode-cdn.net/${path}
3535
* ```
3636
*
3737
* @param resource Uri of the resource to load.

src/vs/workbench/contrib/welcomeGettingStarted/test/browser/gettingStartedMarkdownRenderer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ suite('Getting Started Markdown Renderer', () => {
2323
const rendered = await renderer.renderMarkdown(mdPath, mdBase);
2424
const imageSrcs = [...rendered.matchAll(/img src="[^"]*"/g)].map(match => match[0]);
2525
for (const src of imageSrcs) {
26-
const targetSrcFormat = /^img src="https:\/\/file%2B.vscode-resource.vscode-webview.net\/.*\/vs\/workbench\/contrib\/welcomeGettingStarted\/common\/media\/.*.png"$/;
26+
const targetSrcFormat = /^img src="https:\/\/file%2B.vscode-resource.vscode-cdn.net\/.*\/vs\/workbench\/contrib\/welcomeGettingStarted\/common\/media\/.*.png"$/;
2727
assert(targetSrcFormat.test(src), `${src} didnt match regex`);
2828
}
2929
languageService.dispose();

src/vs/workbench/services/environment/browser/environmentService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvi
181181
get webviewExternalEndpoint(): string {
182182
const endpoint = this.options.webviewEndpoint
183183
|| this.productService.webviewContentExternalBaseUrlTemplate
184-
|| 'https://{{uuid}}.vscode-webview.net/{{quality}}/{{commit}}/out/vs/workbench/contrib/webview/browser/pre/';
184+
|| 'https://{{uuid}}.vscode-cdn.net/{{quality}}/{{commit}}/out/vs/workbench/contrib/webview/browser/pre/';
185185

186186
const webviewExternalEndpointCommit = this.payload?.get('webviewExternalEndpointCommit');
187187
return endpoint

0 commit comments

Comments
 (0)