2
0
This commit is contained in:
2026-03-30 18:50:24 +09:00
parent 7b8e34d990
commit bc07a22b13

View File

@@ -12,7 +12,11 @@ pub struct Endpoint {
/// Build XRPC URL for an endpoint
pub fn url(pds: &str, endpoint: &Endpoint) -> String {
format!("https://{}/xrpc/{}", pds, endpoint.nsid)
let host = pds
.strip_prefix("https://")
.or_else(|| pds.strip_prefix("http://"))
.unwrap_or(pds);
format!("https://{}/xrpc/{}", host, endpoint.nsid)
}
pub mod app_bsky_actor {