We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7058bff + e9871a2 commit 9b04f1dCopy full SHA for 9b04f1d
libsql/src/database/builder.rs
@@ -366,7 +366,14 @@ cfg_replication! {
366
let client = hyper::client::Client::builder()
367
.build::<_, hyper::Body>(connector.clone());
368
369
- let req = http::Request::get(format!("{url}/sync/0/0/0"))
+ let prefix = if url.starts_with("libsql://") {
370
+ let mut result = "https://".to_string();
371
+ result.push_str(&url["libsql://".len()..]);
372
+ result
373
+ } else {
374
+ url.to_string()
375
+ };
376
+ let req = http::Request::get(format!("{prefix}/sync/0/0/0"))
377
.header("Authorization", format!("Bearer {}", auth_token))
378
.body(hyper::Body::empty())
379
.unwrap();
0 commit comments