blackbird / module-nonce-provider
N/A
Installs: 1 288
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- magento/framework: *
README
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
- If you have any issue with this code, feel free to open an issue.
- If you want to contribute to this project, feel free to create a pull request.
Contact
For further information, contact us:
- by email: hello@bird.eu
- or by form: https://black.bird.eu/en/contacts/
Authors
- Aline Denizot - Maintainer - It's me!
- Blackbird Team - Contributor - They're awesome!
License
This project is licensed under the MIT License - see the LICENSE file for details.
That's all folks!