StrictTransportSecurity
Builder for the Strict-Transport-Security (HSTS) HTTP response header.
Usage
StrictTransportSecurity()Default header value: max-age=31536000
Notes
* Only send this header over HTTPS; browsers ignore it otherwise. * preload requires includeSubDomains and at least one year max-age. * max-age is required by the HSTS specification.
Resources: - https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security - https://hstspreload.org/ - https://owasp.org/www-project-secure-headers/
Parameter Attributes
header_name: str_max_age: int | None = None_include_subdomains: bool = False_preload: bool = False_raw_value: str | None = None