File tree Expand file tree Collapse file tree 3 files changed +3
-0
lines changed
middleware-trailing-slash Expand file tree Collapse file tree 3 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export function middleware(request: NextRequest) {
55 const response : NextResponse = NextResponse . next ( )
66
77 // report Next.js Middleware Runtime (not the execution runtime, but target runtime)
8+ // @ts -expect-error EdgeRuntime global not declared
89 response . headers . append ( 'x-runtime' , typeof EdgeRuntime !== 'undefined' ? EdgeRuntime : 'node' )
910 response . headers . set ( 'x-hello-from-middleware-res' , 'hello' )
1011
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export function middleware(request: NextRequest) {
66
77 response . headers . append ( 'Deno' in globalThis ? 'x-deno' : 'x-node' , Date . now ( ) . toString ( ) )
88 // report Next.js Middleware Runtime (not the execution runtime, but target runtime)
9+ // @ts -expect-error EdgeRuntime global not declared
910 response . headers . append ( 'x-runtime' , typeof EdgeRuntime !== 'undefined' ? EdgeRuntime : 'node' )
1011 response . headers . set ( 'x-hello-from-middleware-res' , 'hello' )
1112
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export function middleware(request: NextRequest) {
66
77 response . headers . append ( 'Deno' in globalThis ? 'x-deno' : 'x-node' , Date . now ( ) . toString ( ) )
88 // report Next.js Middleware Runtime (not the execution runtime, but target runtime)
9+ // @ts -expect-error EdgeRuntime global not declared
910 response . headers . append ( 'x-runtime' , typeof EdgeRuntime !== 'undefined' ? EdgeRuntime : 'node' )
1011 response . headers . set ( 'x-hello-from-middleware-res' , 'hello' )
1112
You can’t perform that action at this time.
0 commit comments