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 support for passing a CSP nonce through to the templates #289

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jschniper
Copy link

The changes allow you to pass a csp_nonce_assign_key as an option into the plug and it uses that to pull a nonce from the conn.assigns to add a nonce attribute to the script and link tags.

This is my first hack at it but it seems to resolve the CSP related errors that I was experiencing. Open to suggestions for improvement.

One note: I'm experiencing a JS error on the advanced GraphiQL interface but I'm also experiencing the same error when I run against the current main branch in this repo. Not exactly sure what is going on there but it doesn't seem as though my changes are the cause.

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.

None yet

1 participant