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 nonce prop to ExternalScripts #448

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

Conversation

mnemitz
Copy link
Contributor

@mnemitz mnemitz commented Jan 24, 2025

This change allows for a nonce value to be passed to the ExternalScripts component (similarly to the Scripts component from @remix-run/react) in order to comply with the scriptSrc directive of the page's CSP.

The rationale for allowing this prop specifically is that the nonce value is not practical to set in the ExternalScriptHandle itself, as it is generated per-request.

Happy to discuss if there's a different recommended way of achieving this :)

@mnemitz mnemitz force-pushed the add-nonce-external-scripts branch from 07af8ed to 1377f09 Compare January 24, 2025 15:41
@mnemitz mnemitz changed the title Add nonce ExternalScripts Add nonce prop to ExternalScripts Jan 24, 2025
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.

1 participant