Skip to content

Commit 08d462f

Browse files
committed
chore: fix nonce
1 parent db01232 commit 08d462f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/plugin-rsc/examples/basic/src/routes/use-cache/server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { revalidateCache } from '../../use-cache-runtime'
1+
import { revalidateCache } from '../../framework/use-cache-runtime'
22

33
export function TestUseCache() {
44
return (

packages/plugin-rsc/examples/basic/src/server.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ export default async function handler(request: Request): Promise<Response> {
1111
</>
1212
)
1313
const nonce = !process.env.NO_CSP ? crypto.randomUUID() : undefined
14-
const response = await handleRequest({ request, getRoot: () => root })
14+
const response = await handleRequest({
15+
request,
16+
getRoot: () => root,
17+
nonce,
18+
})
1519
if (nonce && response.headers.get('content-type')?.includes('text/html')) {
1620
response.headers.set(
1721
'content-security-policy',

0 commit comments

Comments
 (0)