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 in Magento 2.

Developers use this to automatically upgrade insecure (HTTP) resource requests to secure (HTTPS) requests when both frontend and admin are configured to use HTTPS and the upgrade insecure feature is enabled in store configuration.

Public Methods

  • canApply()