Available on crate feature
security only.Expand description
Middleware to add security headers to every response.
Wrap the app with SecurityHeader::default().build() and
customize fields or enable HSTS (see SecurityHeader::set_default_hsts) as needed.
Structs§
- Security
Header - Security headers applied to every response by
SecurityHeader::build.
Enums§
- Cross
Origin Opener Policy - Value of the
Cross-Origin-Opener-Policyheader. - Referer
Policy - Value of the
Referrer-Policyheader. - Strict
Transport Security - Value of the
Strict-Transport-Security(HSTS) header. The payload ismax-agein seconds; variants add theincludeSubDomains/preloaddirectives. - XFrame
Options - Value of the
X-Frame-Optionsheader.