Skip to content

Commit b599401

Browse files
Revert "feat: honor standard HTTP_PROXY env vars"
This reverts commit caf9236.
1 parent e71c43d commit b599401

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

api-client/src/lib.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,17 @@ impl ShuttleApiClient {
5151
timeout: Option<u64>,
5252
) -> Self {
5353
let mut builder = reqwest::Client::builder();
54-
55-
if let Ok(proxy) = std::env::var("HTTP_PROXY") {
56-
builder = builder.proxy(reqwest::Proxy::http(proxy).unwrap());
57-
}
58-
59-
if let Ok(proxy) = std::env::var("HTTPS_PROXY") {
60-
builder = builder.proxy(reqwest::Proxy::https(proxy).unwrap());
61-
}
62-
63-
if let Some(headers) = headers {
64-
builder = builder.default_headers(headers);
54+
if let Some(h) = headers {
55+
builder = builder.default_headers(h);
6556
}
66-
6757
let client = builder
6858
.timeout(Duration::from_secs(timeout.unwrap_or(60)))
6959
.build()
7060
.unwrap();
7161

7262
let builder = reqwest_middleware::ClientBuilder::new(client);
73-
7463
#[cfg(feature = "tracing")]
7564
let builder = builder.with(LoggingMiddleware);
76-
7765
let client = builder.build();
7866

7967
Self {

0 commit comments

Comments
 (0)