silverwolf-x/project / errors /nonce-contained-invalid-characters.mdx
silverwolf-x's picture
download
raw
738 Bytes
---
title: nonce contained invalid characters
---
## Why This Error Occurred
A request to your Next.js application contained a `Content-Security-Policy`
header with a `script-src` directive and `nonce` that contains
invalid characters (any one of `<>&` characters). For example:
- `'nonce-<script />'`: not allowed
- `'nonce-/>script<>'`: not allowed
- `'nonce-PHNjcmlwdCAvPg=='`: allowed
- `'nonce-Lz5zY3JpcHQ8Pg=='`: allowed
## Possible Ways to Fix It
We recommend using a randomly generated UUID for your nonce.
Learn more about how to use nonces with Next.js in our [Content Security Policy](/docs/app/guides/content-security-policy) docs.
## Useful Links
- [Content Security Policy](/docs/app/guides/content-security-policy)

Xet Storage Details

Size:
738 Bytes
·
Xet hash:
7c76d99a1ccafd4f67ed0c47e7eb560084b468452d4c92f3865ba82a8069b971

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.