Log in
Model

CspRenderer

Magento\Csp\Model\CspRenderer

What it does

This class is responsible for rendering Content Security Policy (CSP) headers in HTTP responses.

It collects all defined CSP policies and uses appropriate renderers to add them as headers to the response, helping secure the Magento application against XSS and other code injection attacks.

Developers use this class to automatically apply CSP rules to outgoing HTTP responses.

Public Methods

  • render()