Skip to main content

load_url

Function load_url 

Source
pub async fn load_url(
    kb: &dyn KnowledgeBase,
    scope: &TenantScope,
    url: &str,
    config: &ChunkConfig,
) -> Result<usize, Error>
Expand description

Load a URL, strip HTML tags, and index chunks.

SECURITY (F-KB-2): the URL is validated via crate::http::SafeUrl::parse (scheme allowlist + IP blocklist), the request uses crate::http::safe_client_builder (redirect:none, no_proxy, connect_timeout), and the body is capped at KNOWLEDGE_LOAD_URL_MAX_BYTES.