blackbird/module-nonce-provider

N/A

Installs: 4 090

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:magento2-module

pkg:composer/blackbird/module-nonce-provider

1.0.0 2024-07-02 08:45 UTC

This package is auto-updated.

Last update: 2025-09-30 11:35:29 UTC


README

Latest Stable Version License: MIT

This module add access to the object "$nonceProvider" in all Magento 2 templates to facilitate implementation of CSP nonce security.

/**
 * @var \Blackbird\NonceProvider\ViewModel\NonceProvider $nonceProvider
 */
<script type="text/javascript" <?= $nonceProvider->renderNonceAttribute() ?> >
   console.log("I am authorized now !");
</script>

Setup

Get the package

Zip Package:

Unzip the package in app/code/Blackbird/NonceProvider, from the root of your Magento instance.

Composer Package:

composer require blackbird/module-nonce-provider

Install the module

Go to your Magento root, then run the following Magento command:

php bin/magento setup:upgrade

If you are in production mode, do not forget to recompile and redeploy the static resources, or to use the --keep-generated option.

Support

Contact

For further information, contact us:

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

That's all folks!