Skip to content

Commit 1ff3de3

Browse files
Update src/routes/solid-start/guides/security.mdx
1 parent 5195d4e commit 1ff3de3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/solid-start/guides/security.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ To configure the `Content-Security-Policy` HTTP header, a [middleware](/solid-st
2626

2727
If you want to use a [strict CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP#strict_csp) with nonces:
2828

29-
1. Create a middleware that configures the CSP header, then register it to run on the [`onRequest`](/solid-start/advanced/middleware#onrequest) event.
29+
1. Create a middleware that configures the CSP header.
30+
It must then be registered using the [`onRequest`](/solid-start/advanced/middleware#onrequest) event.
3031
2. Create a nonce using a cryptographic random value generator, such as the [`randomBytes`](https://nodejs.org/api/crypto.html#cryptorandombytessize-callback) function from the `crypto` module.
3132
3. Store the nonce in the [`locals`](/solid-start/advanced/middleware#locals) object.
3233
4. Configure SolidStart to use the nonce in your [`entry-server.tsx`](/solid-start/reference/entrypoints/entry-server) file.

0 commit comments

Comments
 (0)