Magento2 Disable Csp
yireo/magento2-disable-csp
Disables Content Security Policy (CSP) in Magento 2. Simplifies disabling CSP for shops where it's not required.
Build Tests
Code Quality
Tested on Magento 2.4.8-p3
Recent Test History
Each release is tested against the latest Magento version at that time.
Share This Module's Status
README
Loaded from GitHubYireo DisableCsp
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
-
Wouyang_DisableCsp
- Disables the
csp_renderobserver
- Disables the
-
baldwin-agency/magento2-module-csp-shim
- Overrides the Magento CSP module itself and its namespaces (ugly)
This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.