Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

325 B
Raw Blame
use url::Url;

pub fn websocket_cookie_url(url: &Url) -> Url {
    let mut cookie_url = url.clone();
    match url.scheme() {
        "ws" => {
            let _ = cookie_url.set_scheme("http");
        }
        "wss" => {
            let _ = cookie_url.set_scheme("https");
        }
        _ => {}
    }
    cookie_url
}