Why
Following the remix docs, if we implement csp we need to pass the nonce to the renderToPipeableStream but this is not currently possible
See supporting remix docs
Solution
Allow to pass a nonce param in the handleRequest eg
export default async function (request: Request, responseStatusCode: number, responseHeaders: Headers, remixContext: EntryContext) {
const nonce = crypto.randomUUID()
const remixServer = <RemixServer context={remixContext} url={request.url} nonce={nonce} />
return handleRequest(request, responseStatusCode, responseHeaders, remixServer, nonce)
}
Why
Following the remix docs, if we implement csp we need to pass the
nonceto the renderToPipeableStream but this is not currently possibleSee supporting remix docs
Solution
Allow to pass a
nonceparam in thehandleRequesteg