cloudflare / vinext

fix: make RequestContext required on matchHeaders/matchRedirect/matchRewrite (#213)
Next.js always has request context when evaluating has/missing conditions on headers, redirects, and rewrites. There is no code path where these are evaluated without a request. Making ctx required eliminates ambiguity about what happens when context is missing, and surfaces any future call sites that forget to pass it as compile-time errors instead of silent behavioral bugs. Also fixes deploy.ts matchHeaders call that was missing reqCtx. Co-authored-by: Eray <erayackgoz@gmail.com>
Steve Faulkner Steve Faulkner committed on Mar 1, 2026, 06:03 PM
Showing 4 changed files +37 additions -32 deletions
Browse files at this commit โ†’