> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# security.nonce

- **Type:**

```ts
type Nonce = string;
```

- **Default:** `undefined`

Adding a `nonce` attribute to the scripts resources introduced for HTML. This allows the browser to determine whether the script can be executed when it parses inline scripts with matching nonce values.

:::info
The usage of this configuration item is exactly the same as that of Rsbuild. For detailed information, please refer to [Rsbuild - security.nonce](https://v2.rsbuild.dev/config/security/nonce).
:::