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 origin —
scheme://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: