Skip to content

Commit

Permalink
fix CSP with Inline Scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
michenly committed May 15, 2024
1 parent 95b3923 commit a210cbc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions templates/skeleton/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default async function handleRequest(

const body = await renderToReadableStream(
<NonceProvider>
<RemixServer context={remixContext} url={request.url} />
<RemixServer context={remixContext} url={request.url} nonce={nonce} />
</NonceProvider>,
{
nonce,
Expand All @@ -32,8 +32,7 @@ export default async function handleRequest(
}

responseHeaders.set('Content-Type', 'text/html');
// Todo: bring CSP back
// responseHeaders.set('Content-Security-Policy', header);
responseHeaders.set('Content-Security-Policy', header);

return new Response(body, {
headers: responseHeaders,
Expand Down

0 comments on commit a210cbc

Please sign in to comment.