mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Remove deprecated ways of configuring the web worker extension host iframe src
This commit is contained in:
parent
5a9e780f0a
commit
b2e9a3e2e2
|
@ -69,7 +69,6 @@ if (args.help) {
|
|||
' --host Remote host\n' +
|
||||
' --port Remote/Local port\n' +
|
||||
' --local_port Local port override\n' +
|
||||
' --secondary-port Secondary port\n' +
|
||||
' --extension Path of an extension to include\n' +
|
||||
' --extensionId Id of an extension to include\n' +
|
||||
' --open-file uri of the file to open. Also support selections in the file. Eg: scheme://authority/path#L1:2-L10:3\n' +
|
||||
|
@ -84,7 +83,6 @@ if (args.help) {
|
|||
|
||||
const PORT = args.port || process.env.PORT || 8080;
|
||||
const LOCAL_PORT = args.local_port || process.env.LOCAL_PORT || PORT;
|
||||
const SECONDARY_PORT = args['secondary-port'] || (parseInt(PORT, 10) + 1);
|
||||
const SCHEME = args.scheme || process.env.VSCODE_SCHEME || 'http';
|
||||
const HOST = args.host || 'localhost';
|
||||
const AUTHORITY = process.env.VSCODE_AUTHORITY || `${HOST}:${PORT}`;
|
||||
|
@ -288,15 +286,6 @@ server.on('error', err => {
|
|||
console.error(err);
|
||||
});
|
||||
|
||||
const secondaryServer = http.createServer(requestHandler);
|
||||
secondaryServer.listen(SECONDARY_PORT, () => {
|
||||
console.log(`Secondary server available at ${SCHEME}://${HOST}:${SECONDARY_PORT}`);
|
||||
});
|
||||
secondaryServer.on('error', err => {
|
||||
console.error(`Error occurred in server:`);
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
/**
|
||||
* @param {import('http').IncomingMessage} req
|
||||
*/
|
||||
|
@ -417,11 +406,6 @@ async function handleRoot(req, res) {
|
|||
fancyLog(`${ansiColors.magenta('Additional extensions')}: ${additionalBuiltinExtensions.map(e => typeof e === 'string' ? e : path.basename(e.path)).join(', ') || 'None'}`);
|
||||
}
|
||||
|
||||
const secondaryHost = (
|
||||
req.headers['host']
|
||||
? req.headers['host'].replace(':' + PORT, ':' + SECONDARY_PORT)
|
||||
: `${HOST}:${SECONDARY_PORT}`
|
||||
);
|
||||
const openFileUrl = args['open-file'] ? url.parse(args['open-file'], true) : undefined;
|
||||
let selection;
|
||||
if (openFileUrl?.hash) {
|
||||
|
@ -436,7 +420,6 @@ async function handleRoot(req, res) {
|
|||
const webConfigJSON = {
|
||||
folderUri: folderUri,
|
||||
additionalBuiltinExtensions,
|
||||
webWorkerExtensionHostIframeSrc: `${SCHEME}://${secondaryHost}/static/out/vs/workbench/services/extensions/worker/httpWebWorkerExtensionHostIframe.html`,
|
||||
defaultLayout: openFileUrl ? {
|
||||
force: true,
|
||||
editors: [{
|
||||
|
@ -455,10 +438,6 @@ async function handleRoot(req, res) {
|
|||
if (args['wrap-iframe']) {
|
||||
webConfigJSON._wrapWebWorkerExtHostInIframe = true;
|
||||
}
|
||||
if (req.headers['x-forwarded-host']) {
|
||||
// support for running in codespace => no iframe wrapping
|
||||
delete webConfigJSON.webWorkerExtensionHostIframeSrc;
|
||||
}
|
||||
|
||||
const authSessionInfo = args['github-auth'] ? {
|
||||
id: uuid.v4(),
|
||||
|
|
|
@ -88,10 +88,6 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost
|
|||
|
||||
private _webWorkerExtensionHostIframeSrc(): string | null {
|
||||
const suffix = this._environmentService.debugExtensionHost && this._environmentService.debugRenderer ? '?debugged=1' : '?';
|
||||
if (this._environmentService.options && this._environmentService.options.webWorkerExtensionHostIframeSrc) {
|
||||
return this._environmentService.options.webWorkerExtensionHostIframeSrc + suffix;
|
||||
}
|
||||
|
||||
const forceHTTPS = (location.protocol === 'https:');
|
||||
const webEndpointUrlTemplate = this._productService.webEndpointUrlTemplate;
|
||||
const commit = this._productService.commit;
|
||||
|
@ -112,22 +108,6 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost
|
|||
return base + suffix;
|
||||
}
|
||||
|
||||
if (this._productService.webEndpointUrl) {
|
||||
let baseUrl = this._productService.webEndpointUrl;
|
||||
if (this._productService.quality) {
|
||||
baseUrl += `/${this._productService.quality}`;
|
||||
}
|
||||
if (this._productService.commit) {
|
||||
baseUrl += `/${this._productService.commit}`;
|
||||
}
|
||||
const base = (
|
||||
forceHTTPS
|
||||
? `${baseUrl}/out/vs/workbench/services/extensions/worker/httpsWebWorkerExtensionHostIframe.html`
|
||||
: `${baseUrl}/out/vs/workbench/services/extensions/worker/httpWebWorkerExtensionHostIframe.html`
|
||||
);
|
||||
|
||||
return base + suffix;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -380,12 +380,6 @@ interface IWorkbenchConstructionOptions {
|
|||
*/
|
||||
readonly webviewEndpoint?: string;
|
||||
|
||||
/**
|
||||
* An URL pointing to the web worker extension host <iframe> src.
|
||||
* @deprecated. This will be removed soon.
|
||||
*/
|
||||
readonly webWorkerExtensionHostIframeSrc?: string;
|
||||
|
||||
/**
|
||||
* A factory for web sockets.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue