Log in
Interface

CspAwareActionInterface

Magento\Csp\Api\CspAwareActionInterface

What it does

This interface allows Magento 2 controllers to customize Content Security Policy (CSP) headers for specific routes or pages.

Developers implement this interface when they need to add, modify, or remove CSP directives for their controller action, such as allowing inline scripts or external resources that would otherwise be blocked by default CSP rules.

Public Methods

  • modifyCsp()