Yireo_CspUtilities

PHP 8.1 - 8.4
Magento 2.4.7 | 2.4.8
CSP Yes
Latest Release 1.0.1

Magento version PHP version License Latest Version

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;

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation

Support

For getting support, create an Issue under the following project URL:

https://github.com/yireo/Yireo_CspUtilities

Composer details
Magento module name
Yireo_CspUtilities
Composer name
yireo/magento2-csp-utilities
Composer version
No release yet
Default branch
master
Requirements
magento/framework: ^102.0 || ^103.0
php: >=8.2 <8.6
Releases
1.0.1 23 October 2026
Changelog

[1.0.1] - 10 March 2025

Fixed

  • Potential regex fail could cause PHP notice

[1.0.0] - 23 August 2024

  • Initial release

Last modified: October 17, 2026