Popular Module Stable v1.0.1

Magento2 Csp Utilities

yireo/magento2-csp-utilities

Provides CSP (Content Security Policy) utilities for other modules, including nonce and hash generation. Helps improve website security by managing CSP directives.

429,225
Downloads
Above average
3
GitHub Stars
Below average
10mo ago
Last Release
0
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
25 warnings
L5 PHPStan

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.0.1 on Magento 2.4.8-p3
Dec 26, 2025
GitHub Repository
Source code & docs
Packagist
Version history
Issues & Support
Get help or report bugs

Share This Module's Status

Magento2 Csp Utilities Magento compatibility status badge

README

Loaded from GitHub

Magento 2 module CSP Utilities

This Magento 2 module offers CSP utilities for other modules, including various Yireo extensions.

Installation

Installation is usually done via other modules, but if you wanted to separately install this, here you go:

composer require yireo/magento2-csp-utilities
bin/magento module:enable Yireo_CspUtilities

Configuration

  • Inline Script Mode
    • nonce: Generate CSP nonces for Yireo extensions. This is the default, but it is currently not as secure in Magento, if the HTML is cached;
    • hash: Generate CSP hashes for Yireo extensions. This is more secure. However, with this option, your HTTP headers could grow, which could lead into webserver limits;

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.

Back to All Modules