hopefully fix docs

pull/17338/head
Elliott Johnson 2 weeks ago
parent f614efe401
commit 25e4050fe2

@ -69,12 +69,14 @@ All data returned from a `hydratable` function must be serializable. But this do
`hydratable` adds an inline `<script>` block to the `head` returned from `render`. If you're using CSP, this script will likely fail to run. You can provide a `nonce` to `render`:
```ts
// @errors: 2304 2708
const { head, body } = await render(App, { csp: { nonce: 'abcd123' } });
```
This will add the `nonce` to the script block. If you need to use hashes instead, you can do that as well:
```ts
// @errors: 2304 2708
const { head, body, hashes } = await render(App, { csp: { hash: true } });
```

Loading…
Cancel
Save