Initialize REQWESTGLOBALCONFIG in main::entry

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-22 19:14:32 +10:00
parent a3ab3ec502
commit 087d544331
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -185,6 +185,11 @@ async fn entry() -> Result<()> {
bin_dir: opts.bin_dir.take(), bin_dir: opts.bin_dir.take(),
}; };
// Initialize REQWESTGLOBALCONFIG
REQWESTGLOBALCONFIG
.set((opts.https_only_mode, opts.min_tls_version))
.unwrap();
// Setup logging // Setup logging
let mut log_config = ConfigBuilder::new(); let mut log_config = ConfigBuilder::new();
log_config.add_filter_ignore("hyper".to_string()); log_config.add_filter_ignore("hyper".to_string());