vercel / analytics

Privacy-friendly, real-time traffic insights
https://vercel.com/analytics
Mozilla Public License 2.0
416 stars 24 forks source link

Feature Request: Allow nonce as optional prop in analytics component for content security policy #122

Open wkelly1 opened 7 months ago

wkelly1 commented 7 months ago

The analytics component inserts a script tag but does not allow you to specify a nonce. This means that if the script-src content security policy header is set to use a nonce then it won't be loaded.

Proposed change

It would be helpful if the analytics component could have a nonce prop which gets added to the script tag.

<Analytics nonce="8IBTHwOdqNKAWeKl7plt8g=="/>
feugy commented 5 months ago

Hello @wkelly1 and thanks for the suggestion!

I'll record this in our ticketing system.