We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38a2f3b commit 7492aacCopy full SHA for 7492aac
tests/fixtures/middleware-conditions/middleware-shared.ts
@@ -4,6 +4,8 @@ import { NextResponse } from 'next/server'
4
export function middleware(request: NextRequest) {
5
const response: NextResponse = NextResponse.next()
6
7
+ // report Next.js Middleware Runtime (not the execution runtime, but target runtime)
8
+ response.headers.append('x-runtime', typeof EdgeRuntime !== 'undefined' ? EdgeRuntime : 'node')
9
response.headers.set('x-hello-from-middleware-res', 'hello')
10
11
return response
0 commit comments