Skip to content

Add Trusted Types support for script injection #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

russellsteadman
Copy link

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

@szchenghuang szchenghuang force-pushed the master branch 9 times, most recently from 885a65a to 9c7f8cb Compare May 10, 2021 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant