Allow setting trusted domains for links at run-time

It can be set either:

1. In the product.json (normally the product.json is embedded during the
   build and not read at run-time).
2. With the --link-protection-trusted-domains flag.
This commit is contained in:
Asher
2025-05-05 12:12:55 -08:00
committed by Asher
parent 3f2e3340d8
commit ea2caf00ac
3 changed files with 56 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ export enum LogLevel {
export class OptionalString extends Optional<string> {}
/**
* Code flags provided by the user.
* (VS) Code flags provided by the user.
*/
export interface UserProvidedCodeArgs {
"disable-telemetry"?: boolean
@@ -54,6 +54,7 @@ export interface UserProvidedCodeArgs {
"disable-proxy"?: boolean
"session-socket"?: string
"abs-proxy-base-path"?: string
"link-protection-trusted-domains"?: string[]
}
/**
@@ -194,6 +195,10 @@ export const options: Options<Required<UserProvidedArgs>> = {
enable: { type: "string[]" },
help: { type: "boolean", short: "h", description: "Show this output." },
json: { type: "boolean" },
"link-protection-trusted-domains": {
type: "string[]",
description: "Links matching a trusted domain can be opened without link protection.",
},
locale: {
// The preferred way to set the locale is via the UI.
type: "string",