Expand description
Structs§
- Content
Security Policy  - Build a 
Content-Security-Policyheader. - Report
To  - Define 
report-todirective value - Report
ToEndpoint  - Define 
endpointsforreport-todirective 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-Controlheader. - frameguard
 - Mitigates clickjacking attacks by setting the 
X-Frame-Optionsheader. - hsts
 - Sets the 
Strict-Transport-Securityheader 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-Byheader 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-Protectionheader to prevent reflected XSS attacks.