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-cspREADME
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.
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.
composer require yireo/magento2-disable-csp bin/magento module:enable Yireo_DisableCsp
The magento/module-csp package is still necessary and should not be removed via composer replace.
- Wouyang_DisableCsp
- Disables the
csp_renderobserver
- Disables the
- baldwin-agency/magento2-module-csp-shim
- Overrides the Magento CSP module itself and its namespaces (ugly)
Links
- Packagist
- PackageMaven — quality data by PackageMaven
- Repository
- Issues