Skip to main content

normalize_relay_host

Function normalize_relay_host 

Source
pub fn normalize_relay_host(raw: &str) -> Result<String, RelayError>
Expand description

Normalize one configured relay host into an origin URL.

FEATHERREADER_RELAY_HOSTS is documented as a bare-hostname list (relay1.us-west.bsky.network,…) while the spec’s prose example is a full https:// URL — both must work, so a value with no :// gets https://. Any path/query/fragment is stripped, so a stray https://host/xrpc/ in config cannot produce …/xrpc/xrpc/….