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

Add Rails' CSP nonce to the script tag #112

Merged
merged 1 commit into from
Nov 6, 2021
Merged

Conversation

dee-see
Copy link
Contributor

@dee-see dee-see commented Oct 13, 2021

If a CSP is configured and enabled in development mode, it blocks the script and breaks the page. This change adds the nonce when it's configured and leaves an empty nonce tag when it isn't, which doesn't cause any issues.

@fgrehm fgrehm mentioned this pull request Oct 20, 2021
16 tasks
@fgrehm
Copy link
Owner

fgrehm commented Oct 20, 2021

Hey @dee-see , just a heads up that this is something that will come along with the upcoming 2.0 I got in the works, see the PR linked above for more.

If you have the time, it'd be great if you could give that branch a try as well, tks in advance!

@fgrehm
Copy link
Owner

fgrehm commented Oct 28, 2021

Just got a pre-release ready to go. Please give that a try when you get a chance and I'll also just ping more folks for testing before a final release. This PR should auto close after code is on master.

Thanks for your contribution!

@dee-see
Copy link
Contributor Author

dee-see commented Oct 28, 2021

Had a quick look and it seems to work well, thanks!

@fgrehm fgrehm merged commit 1a4a504 into fgrehm:master Nov 6, 2021
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