Skip to content

Commit

Permalink
Pass CSP nonce through to renderToPipeableStream
Browse files Browse the repository at this point in the history
So that React passes the nonce to the script tags it generates when using <Suspense>.

See facebook/react#26026
  • Loading branch information
ahuth committed Nov 16, 2023
1 parent 2bd11c5 commit 22a696c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default function handleRequest(

pipe(body);
},
nonce: loadContext?.cspNonce,
onShellError(error: unknown) {
reject(error);
},
Expand Down

0 comments on commit 22a696c

Please sign in to comment.