From 087d544331367cb67acc7224a0a593557fc0ee19 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Wed, 22 Jun 2022 19:14:32 +1000 Subject: [PATCH] Initialize `REQWESTGLOBALCONFIG` in `main::entry` Signed-off-by: Jiahao XU --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 4250a653..10b9f034 100644 --- a/src/main.rs +++ b/src/main.rs @@ -185,6 +185,11 @@ async fn entry() -> Result<()> { bin_dir: opts.bin_dir.take(), }; + // Initialize REQWESTGLOBALCONFIG + REQWESTGLOBALCONFIG + .set((opts.https_only_mode, opts.min_tls_version)) + .unwrap(); + // Setup logging let mut log_config = ConfigBuilder::new(); log_config.add_filter_ignore("hyper".to_string());