@@ -49,6 +49,7 @@ export interface UserProvidedCodeArgs {
4949 category ?: string
5050 "github-auth" ?: string
5151 "disable-update-check" ?: boolean
52+ "disable-file-downloads" ?: boolean
5253}
5354
5455/**
@@ -157,6 +158,11 @@ export const options: Options<Required<UserProvidedArgs>> = {
157158 "Disable update check. Without this flag, code-server checks every 6 hours against the latest github release and \n" +
158159 "then notifies you once every week that a new release is available." ,
159160 } ,
161+ "disable-file-downloads" : {
162+ type : "boolean" ,
163+ description :
164+ "Disable file downloads from Code. Defaults to true." ,
165+ } ,
160166 // --enable can be used to enable experimental features. These features
161167 // provide no guarantees.
162168 enable : { type : "string[]" } ,
@@ -445,6 +451,7 @@ export interface DefaultedArgs extends ConfigArgs {
445451 usingEnvHashedPassword : boolean
446452 "extensions-dir" : string
447453 "user-data-dir" : string
454+ "disable-file-downloads" : boolean
448455 /* Positional arguments. */
449456 _ : string [ ]
450457}
@@ -556,6 +563,10 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
556563 const proxyDomains = new Set ( ( args [ "proxy-domain" ] || [ ] ) . map ( ( d ) => d . replace ( / ^ \* \. / , "" ) ) )
557564 args [ "proxy-domain" ] = Array . from ( proxyDomains )
558565
566+ if ( ! args [ "disable-file-downloads" ] ) {
567+ args [ "disable-file-downloads" ] = false
568+ }
569+
559570 if ( typeof args . _ === "undefined" ) {
560571 args . _ = [ ]
561572 }
0 commit comments