mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Remove deprecated ways of configuring the web worker extension host iframe src
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user