Skip to main content

DEFAULT_HSTS_MAX_AGE

Constant DEFAULT_HSTS_MAX_AGE 

Source
pub const DEFAULT_HSTS_MAX_AGE: u32 = 31_536_000;
Expand description

Default Strict-Transport-Security: max-age value (1 year, 31_536_000 seconds) substituted at config-load when an [hsts] block sets enabled = true but omits max_age. Matches the HSTS preload list minimum (https://hstspreload.org/) and the Caddy / Nginx community recommendation. Operators can override with any u32; max_age = 0 is the RFC 6797 §11.4 kill switch and is allowed silently.