File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
middleware/app/middleware
playground15/app/api/buildid Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @opennextjs/cloudflare " : patch
3+ ---
4+
5+ await ` headers() `
Original file line number Diff line number Diff line change 11import { headers } from "next/headers" ;
22
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" ) ;
55
66 return (
77 < >
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ export async function GET() {
55 const nextConfig = process . env . __NEXT_PRIVATE_STANDALONE_CONFIG
66 ? JSON . parse ( process . env . __NEXT_PRIVATE_STANDALONE_CONFIG )
77 : undefined ;
8- return Response . json ( { nextConfig, headers : headers ( ) } ) ;
8+ return Response . json ( { nextConfig, headers : await headers ( ) } ) ;
99}
You can’t perform that action at this time.
0 commit comments