react-google-invisible-recaptcha
react-google-invisible-recaptcha copied to clipboard
Add Trusted Types support for script injection
Trusted Types
Trusted Types is a new web API to support script security, and it can be used as part of a Content-Security-Policy
.
Problem
The recaptcha script injection would be blocked if require-trusted-types-for 'script'
is added to the CSP, and there is no current workaround.
Fixes
- An optional
trustedTypePolicy
prop was added, so when Trusted Types is supported by the browser and the prop is provided, the policy is applied. - Dependencies were updated
- Version was bumped to v0.3.0 for release