Skip to main content

security_headers_layer

Function security_headers_layer 

Source
pub fn security_headers_layer() -> SecurityHeadersLayer
Expand description

Creates a layer that applies conservative API security headers.

Responses receive:

  • x-content-type-options: nosniff
  • x-frame-options: DENY
  • referrer-policy: no-referrer

Existing values for those headers are replaced.