Skip to content
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

Fix/security csp style src #223

Merged
merged 2 commits into from
Nov 23, 2016

Conversation

briantrice
Copy link
Contributor

@briantrice briantrice commented Nov 4, 2016

My team uses CSP to secure a React app that uses ReactTooltip, but the way the style header is injected is incompatible, triggering a security warning about dynamic javascript injection.

This adds another build step that generates a separate static CSS file for inclusion, with a global configuration flag to avoid the injection.

No defaults have been changed, so the current example and usage story work the same, but I'm hoping a reasonable way to toggle the flag can be made other than to pass a prop insecure={false} to every component instance.

What do you think?

@paulyoung
Copy link

@wwayne is there anything I can do to move this one along?

@wwayne wwayne merged commit b817d16 into ReactTooltip:master Nov 23, 2016
@wwayne
Copy link
Collaborator

wwayne commented Nov 23, 2016

This is awesome, thanks

@briantrice briantrice deleted the fix/security-csp-style-src branch December 1, 2016 21:08
@sihil
Copy link

sihil commented May 15, 2017

This is a great addition (just hit the CSP issue) @wwayne. Having said that I'm not a big user of the client side ecosystem and can't find the docs on how to explicitly include the CSS. Have copy and pasted for now, but suspect there is a better way. Any chance someone could improve the docs with a few lines on how to set insecure=false?

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.

4 participants