mirror of
https://github.com/coder/code-server.git
synced 2026-03-30 00:02:16 +08:00
* Update Code to 1.113.0 * Use CI build targets The target we have been using has started throwing all sorts of errors during the build (even without any of our patches). After checking the VS Code repo I think these are the ones we should actually be using. They are way faster, too. --------- Co-authored-by: Asher <ash@coder.com>
50 lines
2.1 KiB
Diff
50 lines
2.1 KiB
Diff
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 ----- */
|
|
|
|
@@ -118,6 +119,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
|
|
@@ -339,6 +339,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,
|
|
@@ -353,6 +361,7 @@ export class WebClientServer {
|
|
telemetryEndpoint: this._productService.telemetryEndpoint,
|
|
embedderIdentifier: 'server-distro',
|
|
extensionsGallery: this._productService.extensionsGallery,
|
|
+ linkProtectionTrustedDomains,
|
|
};
|
|
|
|
const proposedApi = this._environmentService.args['enable-proposed-api'];
|