From 22a696c2cfb1b91bacbc468e35507c0296714f77 Mon Sep 17 00:00:00 2001 From: Andrew Huth Date: Thu, 16 Nov 2023 10:24:53 -0500 Subject: [PATCH] Pass CSP nonce through to renderToPipeableStream So that React passes the nonce to the script tags it generates when using . See https://github.com/facebook/react/issues/26026 --- app/entry.server.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/entry.server.tsx b/app/entry.server.tsx index 8556252..4c2d8d5 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -45,6 +45,7 @@ export default function handleRequest( pipe(body); }, + nonce: loadContext?.cspNonce, onShellError(error: unknown) { reject(error); },