Log in
Interface

PolicyCollectorInterface

Magento\Csp\Api\PolicyCollectorInterface

What it does

This interface defines the contract for collecting Content Security Policy (CSP) configurations from various sources in Magento 2.

Developers implement this interface to create custom policy collectors that gather CSP rules from different configuration sources, which are then used to generate CSP headers for protecting against XSS and other injection attacks.

Public Methods

  • collect()