diff --git a/rust/examples/pdb-ng/src/lib.rs b/rust/examples/pdb-ng/src/lib.rs index 3fdea60fb..7e33737f1 100644 --- a/rust/examples/pdb-ng/src/lib.rs +++ b/rust/examples/pdb-ng/src/lib.rs @@ -252,6 +252,14 @@ fn sym_store_exists(path: &String) -> Result { if !Settings::new("").get_bool("network.pdbAutoDownload", None, None) { return Err(anyhow!("Auto download disabled")); } + + // If the user doesn't want to check the network path + // (in the case of using a symbol server proxy that doesn't accept HEAD requests), + // just assume the path exists and return true. + if path.contains("localhost:") && Settings::new("").get_bool("network.pdbSkipNetworkPathCheck", None, None) { + return Ok(true); + } + info!("HEAD: {}", path); // Download from remote @@ -756,6 +764,18 @@ fn init_plugin() -> bool { }"#, ); + settings.register_setting_json( + "network.pdbSkipNetworkPathCheck", + r#"{ + "title" : "Skip Network Path Check", + "type" : "boolean", + "default" : false, + "aliases" : ["pdb.SkipNetworkPathCheck", "pdb.skip-network-path-check"], + "description" : "Skip the HEAD http request that verifies if a PDB network path exists (only for localhost servers).", + "ignore" : [] + }"#, + ); + settings.register_setting_json( "pdb.files.symbolServerList", r#"{