Expand description
Structs§
- Content
Security Policy - Build a
Content-Security-Policy
header. - Report
To - Define
report-to
directive value - Report
ToEndpoint - Define
endpoints
forreport-to
directive value - Timing
Allow Origin - Specify origins that are allowed to see values via the Resource Timing API.
Enums§
- Frame
Options - Set the frameguard level.
- Referrer
Options - Set the Referrer-Policy level
- Source
- Define source value
Functions§
- default
- Apply a set of default protections.
- dns_
prefetch_ control - Disable browsers’ DNS prefetching by setting the
X-DNS-Prefetch-Control
header. - frameguard
- Mitigates clickjacking attacks by setting the
X-Frame-Options
header. - hsts
- Sets the
Strict-Transport-Security
header to keep your users onHTTPS
. - nosniff
- Prevent browsers from trying to guess (“sniff”) the MIME type, which can have security implications.
- powered_
by - Removes the
X-Powered-By
header to make it slightly harder for attackers to see what potentially-vulnerable technology powers your site. - referrer_
policy - Mitigates referrer leakage by controlling the referer[sic] header in links away from pages
- xss_
filter - Sets the
X-XSS-Protection
header to prevent reflected XSS attacks.