Skip to content

Commit 5f9a663

Browse files
add env to skip tls verification
1 parent eac4a82 commit 5f9a663

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/cli.rs

+9
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,15 @@ pub struct Options {
207207
)]
208208
pub trusted_ca_certs_path: Option<PathBuf>,
209209

210+
/// Set client to skip tls verification
211+
#[arg(
212+
long,
213+
env = "P_TLS_SKIP_VERIFY",
214+
value_name = "bool",
215+
default_value = "false"
216+
)]
217+
pub skip_tls: bool,
218+
210219
// Storage configuration
211220
#[arg(
212221
long,

src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ pub use handlers::http::modal::{
5656
ingest_server::IngestServer, query_server::QueryServer, server::Server, ParseableServer,
5757
};
5858
use once_cell::sync::Lazy;
59+
use parseable::PARSEABLE;
5960
use reqwest::{Client, ClientBuilder};
6061

6162
// It is very unlikely that panic will occur when dealing with locks.
@@ -100,7 +101,7 @@ pub static INTRA_CLUSTER_CLIENT: Lazy<Client> = Lazy::new(|| {
100101
.brotli(true) // brotli compress for all requests
101102
.use_rustls_tls() // use only the rustls backend
102103
.http1_only() // use only http/1.1
103-
.danger_accept_invalid_certs(true)
104+
.danger_accept_invalid_certs(PARSEABLE.options.skip_tls)
104105
.build()
105106
.expect("Construction of client shouldn't fail")
106107
});

0 commit comments

Comments
 (0)