Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[rust][core] keep TLS validation enabled

Neeraj Guptaf4e7555342c6
diff --git a/rust/core/src/http.rs b/rust/core/src/http.rs
index 7ea1e5745e..97e2928c70 100644
--- a/rust/core/src/http.rs
+++ b/rust/core/src/http.rs
@@ -9,7 +9,6 @@ use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use thiserror::Error;
-const DEFAULT_BASE_URL: &str = "https://api.ente.io";
const TOKEN_HEADER: &str = "X-Auth-Token";
const CLIENT_PKG_HEADER: &str = "X-Client-Package";
const CLIENT_VERSION_HEADER: &str = "X-Client-Version";
@@ -115,17 +114,10 @@ impl HttpClient {
}
});
- let is_http = base_url.starts_with("http://");
- let is_default = base_url.starts_with(DEFAULT_BASE_URL);
- let allow_insecure = is_http || !is_default;
-
let mut builder = reqwest::Client::builder();
if let Some(timeout) = config.timeout_secs {
builder = builder.timeout(Duration::from_secs(timeout));
}
- if allow_insecure {
- builder = builder.danger_accept_invalid_certs(true);
- }
let client = builder.build().unwrap_or_else(|e| {
panic!("failed to build HTTP client for '{}': {}", base_url, e);