Skip to content

3.1.0

Choose a tag to compare

@freekmurze freekmurze released this 31 Jan 05:38
· 3 commits to main since this release
36ed000

What's Changed

New Features

  • Add CSP nonce support for script tags via nonceEnabled configuration 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.