Support for disable SSL check for requests
tglman opened this issue · comments
tglman commented
Skip the check for SSL certificates validity, useful on test environments or on all setup that are not signed with the a certificate chain
The fix is as easy as replace:
let client = reqwest::blocking::Client::new();
with:
let client = reqwest::blocking::Client::builder()
.danger_accept_invalid_certs(disabled_settings) //disabled_settings is the variable source of the setting.
.build()?;
an additional implementation could consider also the support of custom certificates with: https://docs.rs/reqwest/0.10.7/reqwest/struct.ClientBuilder.html#method.add_root_certificate
The most challenging part of this implementation is actually pass the setting from the main to the client.
Regards