Log in
Model

UpgradeInsecure

Magento\Store\Model\HeaderProvider\UpgradeInsecure

What it does

This class adds a Content-Security-Policy header with 'upgrade-insecure-requests' directive to HTTP responses when both frontend and admin are configured to use HTTPS.

Developers would use this to automatically upgrade insecure HTTP requests to HTTPS, improving security by ensuring all resources load over secure connections when the store is fully HTTPS-enabled.

Public Methods

  • canApply()