mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Without this, any spans added by the middleware implementation would be orphaned and create extra traces.
16 lines
360 B
TypeScript
16 lines
360 B
TypeScript
import type { NextRequest, NextFetchEvent } from 'next/server'
|
|
import { NextResponse } from 'next/server'
|
|
|
|
export const config: {
|
|
matcher: string[]
|
|
} = {
|
|
matcher: ['/behind-middleware', '/behind-middleware/:path*'],
|
|
}
|
|
|
|
export async function middleware(
|
|
request: NextRequest,
|
|
event?: NextFetchEvent
|
|
): Promise<Response> {
|
|
return NextResponse.next()
|
|
}
|