Skip to content

Conversation

@Pruxis
Copy link
Contributor

@Pruxis Pruxis commented Feb 6, 2025

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:
image

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

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2025

🦋 Changeset detected

Latest commit: 35bccb0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
react-use-intercom Patch

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

@Pruxis
Copy link
Contributor Author

Pruxis commented Feb 6, 2025

@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.

Copy link
Owner

@devrnt devrnt left a 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!

Comment on lines 3 to 8
## 5.4.2

### Patch Changes

- d5c7433: Add support for Content-Security-Policy nonce

Copy link
Owner

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

Copy link
Contributor Author

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

Copy link
Owner

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

Copy link
Owner

@devrnt devrnt left a 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 ;)

@Pruxis
Copy link
Contributor Author

Pruxis commented Feb 7, 2025

Also please merge upstream, e2e workflow should be fixed ;)

I think sometimes the E2E tests keep failing due to timeouts.

@devrnt
Copy link
Owner

devrnt commented Feb 7, 2025

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

Copy link
Owner

@devrnt devrnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big thanks!

@devrnt devrnt merged commit 4cfe0f8 into devrnt:main Feb 9, 2025
5 checks passed
@Pruxis
Copy link
Contributor Author

Pruxis commented Feb 9, 2025

Hmmm, must've missed something, still hitting no nonce. Will check to run with npm link

image

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.

2 participants