-
Notifications
You must be signed in to change notification settings - Fork 49
Add support for Content-Security-Policy #784
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
Conversation
🦋 Changeset detectedLatest commit: 35bccb0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@devrnt I've added a changelog, package bump etcetra. Wondering if there's anything else to get this thing through? Package is pretty heavily compiled so not that convenient to properly do patch-package. Would be a great addition to react-use-intercom to allow it to be used in secured applications. |
devrnt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Just some release related feedback, everything else looks great!
| ## 5.4.2 | ||
|
|
||
| ### Patch Changes | ||
|
|
||
| - d5c7433: Add support for Content-Security-Policy nonce | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can skip all the CHANGELOG changes and version bump. Run the changeset script and follow the prompt, changeset will take care of the rest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to however didn't wanne go through downgrading pnpm to install the packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to install pnpm, you can run npx @changesets/cli@2.26.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
devrnt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please merge upstream, e2e workflow should be fixed ;)
I think sometimes the E2E tests keep failing due to timeouts. |
You can ignore it, I ran them locally. I have to look into the flaky tests |
devrnt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big thanks!

A common security practice is to use Content-Security-Policy headers to not allow third-party script tags without a corresponding nonce inside your application
Article: https://web.dev/articles/csp
Example error:

I haven't tested my changes yet, will create a patch-package with the same changes and provide feedback 👍