---
title: "inheritCspNonce"
source: "https://github.com/remix-run/remix/blob/remix@3.2.0/packages/csp-middleware/src/lib/nonce.ts#L31"
---

# inheritCspNonce

## Summary

Carries a document nonce into an internal render request before router dispatch.
Pass the same Request object to the router; cloning it does not carry the nonce.

## Signature

```ts
function inheritCspNonce(request: Request, nonce: string): void

```

## Parameters

### `request`

Internal request whose HTML will be embedded in the enclosing document.

### `nonce`

Enclosing document's nonce.