mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 04:12:55 +00:00
chore: prints a warning when skip_ssl_validation is true (#6367)
chore: warn when skip_ssl_validation is true We already log all configs when a node starts. Signed-off-by: evenyag <realevenyag@gmail.com>
This commit is contained in:
@@ -207,15 +207,16 @@ pub(crate) fn clean_temp_dir(dir: &str) -> Result<()> {
|
||||
}
|
||||
|
||||
pub(crate) fn build_http_client(config: &HttpClientConfig) -> Result<HttpClient> {
|
||||
if config.skip_ssl_validation {
|
||||
common_telemetry::warn!("Skipping SSL validation for object storage HTTP client. Please ensure the environment is trusted.");
|
||||
}
|
||||
|
||||
let client = reqwest::ClientBuilder::new()
|
||||
.pool_max_idle_per_host(config.pool_max_idle_per_host as usize)
|
||||
.connect_timeout(config.connect_timeout)
|
||||
.pool_idle_timeout(config.pool_idle_timeout)
|
||||
.timeout(config.timeout)
|
||||
.danger_accept_invalid_certs({
|
||||
info!("skip_ssl_validation: {}", config.skip_ssl_validation);
|
||||
config.skip_ssl_validation
|
||||
})
|
||||
.danger_accept_invalid_certs(config.skip_ssl_validation)
|
||||
.build()
|
||||
.context(BuildHttpClientSnafu)?;
|
||||
Ok(HttpClient::with(client))
|
||||
|
||||
Reference in New Issue
Block a user