pub async fn security_headers(request: Request, next: Next) -> ResponseExpand description
Add security headers to all responses.
Headers added:
X-Content-Type-Options: nosniff- Prevent MIME sniffingX-Frame-Options: DENY- Prevent clickjackingX-XSS-Protection: 1; mode=block- Legacy XSS protectionContent-Security-Policy: default-src 'none'- Strict CSPCache-Control: no-store- Prevent caching of sensitive dataReferrer-Policy: strict-origin-when-cross-origin- Control referrer info