this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

await `headers()` (#1019)

authored by

Victor Berchet and committed by
GitHub
2a3ee86b a6904a4a

+8 -3
+5
.changeset/tall-dancers-cross.md
··· 1 + --- 2 + "@opennextjs/cloudflare": patch 3 + --- 4 + 5 + await `headers()`
+2 -2
examples/middleware/app/middleware/page.tsx
··· 1 1 import { headers } from "next/headers"; 2 2 3 - export default function MiddlewarePage() { 4 - const cloudflareContextHeader = headers().get("x-cloudflare-context"); 3 + export default async function MiddlewarePage() { 4 + const cloudflareContextHeader = (await headers()).get("x-cloudflare-context"); 5 5 6 6 return ( 7 7 <>
+1 -1
examples/playground15/app/api/buildid/route.ts
··· 5 5 const nextConfig = process.env.__NEXT_PRIVATE_STANDALONE_CONFIG 6 6 ? JSON.parse(process.env.__NEXT_PRIVATE_STANDALONE_CONFIG) 7 7 : undefined; 8 - return Response.json({ nextConfig, headers: headers() }); 8 + return Response.json({ nextConfig, headers: await headers() }); 9 9 }