Function ensure_headers_allowed
Source pub fn ensure_headers_allowed(
origin: Option<&str>,
referer: Option<&str>,
sec_fetch_site: Option<&str>,
request_origin: &str,
public_site_origins: &[String],
mode: RequestSourceMode,
) -> Result<()>
Expand description
Validates raw source header values against the request and public-site origins.
ยงErrors
Returns CsrfError when a header is too long, malformed, missing when required, or untrusted.