@@ -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,10 @@ 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 : "Disable file downloads from Code. Defaults to true." ,
164+ } ,
160165 // --enable can be used to enable experimental features. These features
161166 // provide no guarantees.
162167 enable : { type : "string[]" } ,
@@ -445,6 +450,7 @@ export interface DefaultedArgs extends ConfigArgs {
445450 usingEnvHashedPassword : boolean
446451 "extensions-dir" : string
447452 "user-data-dir" : string
453+ "disable-file-downloads" : boolean
448454 /* Positional arguments. */
449455 _ : string [ ]
450456}
@@ -556,6 +562,10 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
556562 const proxyDomains = new Set ( ( args [ "proxy-domain" ] || [ ] ) . map ( ( d ) => d . replace ( / ^ \* \. / , "" ) ) )
557563 args [ "proxy-domain" ] = Array . from ( proxyDomains )
558564
565+ if ( ! args [ "disable-file-downloads" ] ) {
566+ args [ "disable-file-downloads" ] = false
567+ }
568+
559569 if ( typeof args . _ === "undefined" ) {
560570 args . _ = [ ]
561571 }
0 commit comments