Skip to content

Commit 96d9a14

Browse files
committed
https connector for durable storage
1 parent 5d25018 commit 96d9a14

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

libsql-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ futures = "0.3.25"
3232
futures-core = "0.3"
3333
hmac = "0.12"
3434
hyper = { workspace = true, features = ["http2"] }
35-
hyper-rustls = { git = "https://github.com/rustls/hyper-rustls.git", rev = "163b3f5" }
35+
hyper-rustls = { git = "https://github.com/rustls/hyper-rustls.git", rev = "163b3f5", features = ["http2"] }
3636
hyper-tungstenite = "0.11"
3737
itertools = "0.10.5"
3838
jsonwebtoken = "9"

libsql-server/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,14 @@ where
820820
}
821821

822822
let config = aws_config::load_defaults(BehaviorVersion::latest()).await;
823-
let http_client = HyperClientBuilder::new().build(self.connector.clone().unwrap());
823+
824+
let https_connector = hyper_rustls::HttpsConnectorBuilder::new()
825+
.with_native_roots()
826+
.https_or_http()
827+
.enable_all_versions()
828+
.wrap_connector(self.connector.clone().unwrap());
829+
830+
let http_client = HyperClientBuilder::new().build(https_connector);
824831
let mut builder = config.into_builder();
825832
builder.set_http_client(Some(http_client));
826833
builder.set_endpoint_url(opt.aws_endpoint.clone());

0 commit comments

Comments
 (0)