File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -649,10 +649,7 @@ export function isCodespacesTemplate() {
649649
650650const DATABASE_DOWNLOAD_SETTING = new Setting ( "databaseDownload" , ROOT_SETTING ) ;
651651
652- export const ALLOW_HTTP_SETTING = new Setting (
653- "allowHttp" ,
654- DATABASE_DOWNLOAD_SETTING ,
655- ) ;
652+ const ALLOW_HTTP_SETTING = new Setting ( "allowHttp" , DATABASE_DOWNLOAD_SETTING ) ;
656653
657654export function allowHttp ( ) : boolean {
658655 return ALLOW_HTTP_SETTING . getValue < boolean > ( ) || false ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import {
3030} from "../common/github-url-identifier-helper" ;
3131import { Credentials } from "../common/authentication" ;
3232import { AppCommandManager } from "../common/commands" ;
33- import { ALLOW_HTTP_SETTING } from "../config" ;
33+ import { allowHttp } from "../config" ;
3434import { showAndLogInformationMessage } from "../common/logging" ;
3535
3636/**
@@ -371,7 +371,7 @@ function validateUrl(databaseUrl: string) {
371371 throw new Error ( `Invalid url: ${ databaseUrl } ` ) ;
372372 }
373373
374- if ( ! ALLOW_HTTP_SETTING . getValue ( ) && uri . scheme !== "https" ) {
374+ if ( ! allowHttp ( ) && uri . scheme !== "https" ) {
375375 throw new Error ( "Must use https for downloading a database." ) ;
376376 }
377377}
You can’t perform that action at this time.
0 commit comments