nonce not coming in <script>window #10594
Unanswered
priteshloke
asked this question in
Q&A
Replies: 2 comments
-
Facing the same issue, did you find a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I found the solution, the <ServerRouter nonce={nonce} context={reactRouterContext} url={request.url} /> |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
const { pipe, abort } = renderToPipeableStream(
serverElement,
{
nonce, // ✅ this makes React attach nonce to its internal <script> tags
readyOption {
shellRendered = true;
const body = new PassThrough();
const stream = createReadableStreamFromReadable(body);
}
);
added in renderToPipeableStream but still nonce not coming in <script>window.__reactRouterContext.streamController
Beta Was this translation helpful? Give feedback.
All reactions