Skip to content

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
@mnemitz
Copy link
Contributor Author

mnemitz commented Feb 13, 2025

@sergiodxa Any thoughts on this? 🙂

@lime517
Copy link

lime517 commented Jun 18, 2025

@sergiodxa - any chance of this getting added? I recently ran into this same issue.

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