@@ -49,6 +49,7 @@ export interface UserProvidedCodeArgs {
49
49
category ?: string
50
50
"github-auth" ?: string
51
51
"disable-update-check" ?: boolean
52
+ "disable-file-downloads" ?: boolean
52
53
}
53
54
54
55
/**
@@ -157,6 +158,11 @@ export const options: Options<Required<UserProvidedArgs>> = {
157
158
"Disable update check. Without this flag, code-server checks every 6 hours against the latest github release and \n" +
158
159
"then notifies you once every week that a new release is available." ,
159
160
} ,
161
+ "disable-file-downloads" : {
162
+ type : "boolean" ,
163
+ description :
164
+ "Disable file downloads from Code. Defaults to true." ,
165
+ } ,
160
166
// --enable can be used to enable experimental features. These features
161
167
// provide no guarantees.
162
168
enable : { type : "string[]" } ,
@@ -445,6 +451,7 @@ export interface DefaultedArgs extends ConfigArgs {
445
451
usingEnvHashedPassword : boolean
446
452
"extensions-dir" : string
447
453
"user-data-dir" : string
454
+ "disable-file-downloads" : boolean
448
455
/* Positional arguments. */
449
456
_ : string [ ]
450
457
}
@@ -556,6 +563,10 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
556
563
const proxyDomains = new Set ( ( args [ "proxy-domain" ] || [ ] ) . map ( ( d ) => d . replace ( / ^ \* \. / , "" ) ) )
557
564
args [ "proxy-domain" ] = Array . from ( proxyDomains )
558
565
566
+ if ( ! args [ "disable-file-downloads" ] ) {
567
+ args [ "disable-file-downloads" ] = false
568
+ }
569
+
559
570
if ( typeof args . _ === "undefined" ) {
560
571
args . _ = [ ]
561
572
}
0 commit comments