Log in
Model

Hsts

Magento\Store\Model\HeaderProvider\Hsts

What it does

This class manages the HTTP Strict-Transport-Security (HSTS) header for Magento responses.

It sets a security header that forces browsers to only communicate with the site over HTTPS for one year (31536000 seconds).

The header is only applied when HTTPS is enabled for both frontend and admin areas, and HSTS is explicitly enabled in the configuration.

Public Methods

  • canApply()