Support nonce CSP with React Router + RSC #13648
Master-Hash
started this conversation in
Show and tell / tips
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've built a sample program, running on React Router + RSC, with nonce setup.
https://playground-rsc.hash.memorial/
Source code on https://github.com/Master-Hash/react-router/tree/rsc
My purpose is:
From the source code, I found the ssr environment is designed to get nonce from payload. However it's against my knowledge, that nonce should be generate with HTML, so in ssr entry. So I modify the source code a little.
If my implement is good enough for pr, please tell me! @brophdawg11
Edit:
there is known bug on deployed version when client navigates, reason unknownlocalpnpm start
works correctlyEdit 2: Now fixed
Beta Was this translation helpful? Give feedback.
All reactions