smartlook / smartlook-client

Official Smartlook client for easy frontend integration.
https://smartlook.com
MIT License
28 stars 9 forks source link

feat: add support for `nonce` #20

Closed Joozty closed 2 years ago

Joozty commented 2 years ago

If user wanted to secure their site with CSP they had to use unsafe-inline directive because smartlook client creates inline script to load whole smartlook SDK. This commit adds support for nonce which is set on this inline script. So there is no longer need for unsafe-inline directive in headers instead user can use nonce-<value> directive.

For more info visit:

https://help.smartlook.com/en/articles/3470377-content-security-policy-csp-smartlook