Skip to main content

apply_security_response_headers

Function apply_security_response_headers 

Source
pub fn apply_security_response_headers(
    header: &mut ResponseHeader,
    is_https: bool,
)
Expand description

Inject baseline security headers onto a response.

Notes:

  • Uses “set-if-missing” to avoid overriding application-owned policies.
  • HSTS is only injected when the downstream request is HTTPS.