Skip to main content

audit_headers

Function audit_headers 

Source
pub async fn audit_headers(
    domain: &str,
    timeout: Duration,
) -> Result<HeaderReport>
Expand description

Audits the HTTP security headers served by domain.

Issues a single SSRF-guarded GET https://<domain>/, following redirects (each one re-validated) and grading the response that finally answers.

§Arguments

  • domain - Domain to audit (normalized internally)
  • timeout - HTTP fetch deadline (the whole redirect walk)

§Returns

  • Ok(HeaderReport) - the graded audit
  • Err(SeerError::InvalidDomain) - the domain is not valid
  • Err(SeerError::HttpError) - the host is SSRF-blocked or unreachable

§Example

use std::time::Duration;
let report = seer_core::headers::audit_headers("example.com", Duration::from_secs(10)).await?;
println!("{} scored {}", report.domain, report.grade);