Skip to content

Commit 1f75f21

Browse files
feat: honor insecure-skip-verify env var
1 parent caf9236 commit 1f75f21

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

api-client/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ impl ShuttleApiClient {
6060
builder = builder.proxy(reqwest::Proxy::https(proxy).unwrap());
6161
}
6262

63+
if std::env::var("SHUTTLE_TLS_INSECURE_SKIP_VERIFY")
64+
.is_ok_and(|value| value == "1" || value == "true")
65+
{
66+
builder = builder.danger_accept_invalid_certs(true);
67+
}
68+
6369
if let Some(headers) = headers {
6470
builder = builder.default_headers(headers);
6571
}

0 commit comments

Comments
 (0)