/
githubmirror
/
code-server
Обзор
Документация
Войти
/
githubmirror
/
code-server
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v4.124.2
patches/trusted-domains.diff
49 строк
2 KB
cdrci
Update VS Code to 1.121.0 (#7805)
20 май 2026, 21:20
Не верифицирован
20 май 2026, 21:20
174b775
Код
Авторство
О чём код?
Allow configuring trusted domains via product.json or flag. Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverEnvironmentService.ts +++ code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts @@ -23,6 +23,7 @@ export const serverOptions: OptionDescri 'disable-file-uploads': { type: 'boolean' }, 'disable-getting-started-override': { type: 'boolean' }, 'locale': { type: 'string' }, + 'link-protection-trusted-domains': { type: 'string[]' }, /* ----- server setup ----- */ @@ -122,6 +123,7 @@ export interface ServerParsedArgs { 'disable-file-uploads'?: boolean; 'disable-getting-started-override'?: boolean, 'locale'?: string + 'link-protection-trusted-domains'?: string[], /* ----- server setup ----- */ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts @@ -358,6 +358,14 @@ export class WebClientServer { scopes: [['user:email'], ['repo']] } : undefined; + const linkProtectionTrustedDomains: string[] = []; + if (this._environmentService.args['link-protection-trusted-domains']) { + linkProtectionTrustedDomains.push(...this._environmentService.args['link-protection-trusted-domains']); + } + if (this._productService.linkProtectionTrustedDomains) { + linkProtectionTrustedDomains.push(...this._productService.linkProtectionTrustedDomains); + } + const productConfiguration: Partial<Mutable<IProductConfiguration>> = { codeServerVersion: this._productService.codeServerVersion, rootEndpoint: rootBase, @@ -372,6 +380,7 @@ export class WebClientServer { telemetryEndpoint: this._productService.telemetryEndpoint, embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, + linkProtectionTrustedDomains, }; const proposedApi = this._environmentService.args['enable-proposed-api'];