Disable Csp

yireo/magento2-disable-csp

Disables Content Security Policy (CSP) in Magento 2. Simplifies disabling CSP for shops where it's not required.

No errors foundPHPStan level 9Build passingTrusted vendorSemVer compliant

Supported Magento versions: 2.4.9

167,019 installs★ 22 starsLatest: v1.0.3Released 2025-04-17License: OSL-3.0

composer require yireo/magento2-disable-csp

README

Reproduced from the package’s own README, under its own license, as of 2026-09-13. Links and images point back at the source repository.

Yireo DisableCsp

Magento version PHP version License Latest Version

For shops that don't need CSP to be enabled, this module offers a quick solution. Just install and enable the module and you're done.

Technically, it replaces the default implementation of Magento\Csp\Api\CspRendererInterface with a dummy.

Usage

composer require yireo/magento2-disable-csp
bin/magento module:enable Yireo_DisableCsp

Remark

The magento/module-csp package is still necessary and should not be removed via composer replace.

Alternatives

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation

← All packages from yireo