Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Operator-facing diagnostics helpers (issue #90).

searxng_url is operator-set and can carry secrets (https://user:pass@host, a ?token=…, or a token embedded in the path of a reverse-proxy URL). Anything we log or return in an error must be sanitized to the bare origin first.

Functions§

sanitize_url_origin
Reduce a URL to its originscheme://host[:port] — dropping userinfo, path, query, and fragment. This is the only form safe to log or echo in an error, because every other component can carry a secret. Falls back to a fixed redaction string if the URL doesn’t parse.
search_startup_status
One-line summary of the search subsystem’s configured state, for the startup log. Distinguishes the three states that otherwise collapse to a single “search disabled” at request time: