3.1.0
What's Changed
New Features
- Add CSP nonce support for script tags via
nonceEnabledconfiguration option (#63)
When using this package with spatie/laravel-csp, you can now enable CSP nonces on injected script tags:
// config/googletagmanager.php
'nonceEnabled' => env('GOOGLE_TAG_MANAGER_NONCE_ENABLED', true),This uses Laravel's Vite::cspNonce() to inject the nonce attribute on all script tags.