Remove uuid from webview resource uris

This is no longer be needed. We still serve the webview code itself from a unique subdomain

This also removes the need for `serviceWorkerFetchIgnoreSubdomain`
This commit is contained in:
Matt Bierner
2021-05-21 09:28:28 -07:00
parent 79dea51e79
commit 9847783f62
11 changed files with 26 additions and 56 deletions

View File

@@ -8,10 +8,9 @@ import { DisposableStore } from 'vs/base/common/lifecycle';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { ExtHostTextEditor } from 'vs/workbench/api/common/extHostTextEditor';
import { ExtHostEditors } from 'vs/workbench/api/common/extHostTextEditors';
import { asWebviewUri, webviewGenericCspSource, WebviewInitData } from 'vs/workbench/api/common/shared/webview';
import type * as vscode from 'vscode';
import { ExtHostEditorInsetsShape, MainThreadEditorInsetsShape } from './extHost.protocol';
import { asWebviewUri, webviewGenericCspSource, WebviewInitData } from 'vs/workbench/api/common/shared/webview';
import { generateUuid } from 'vs/base/common/uuid';
export class ExtHostEditorInsets implements ExtHostEditorInsetsShape {
@@ -61,12 +60,11 @@ export class ExtHostEditorInsets implements ExtHostEditorInsetsShape {
const webview = new class implements vscode.Webview {
private readonly _uuid = generateUuid();
private _html: string = '';
private _options: vscode.WebviewOptions = Object.create(null);
asWebviewUri(resource: vscode.Uri): vscode.Uri {
return asWebviewUri(this._uuid, resource, that._initData.remote);
return asWebviewUri(resource, that._initData.remote);
}
get cspSource(): string {