Configuration
Proxy matcher
Statically analyzable path selection for Proxy. Not an authorization boundary. Source: https://nextjs.org/docs/app/api-reference/file-conventions/proxy
Formal Syntax & Structure
nextjs syntaxnextjs
export const config = { matcher: ['/catalog/:path*'] }Working Example
Example Snippetnextjs
import { NextResponse, type NextRequest } from 'next/server';export function proxy(request: NextRequest) { const response = NextResponse.next(); response.headers.set('X-Catalog-Route', 'yes'); return response;}export const config = { matcher: ['/catalog/:path*'] };