playbook/antigravity-awesome-skills/skills/vercel-optimize/references/support-topics/middleware-proxy-edge-cost.md

991 B

id title status candidateKinds frameworks priority citations maxBriefChars
middleware-proxy-edge-cost Middleware edge cost active
middleware_heavy
next@>=12.0.0
90
https://nextjs.org/docs/app/building-your-application/routing/middleware
https://vercel.com/docs/routing-middleware
850

Investigation Brief

Middleware recommendations should reduce unnecessary interception, not remove required request handling.

Evidence To Check

Use topMiddlewarePaths and the matcher config. Confirm which paths need auth, rewrites, headers, or locale handling. Check whether static assets, images, or routes with no middleware need are being matched.

Do Not Recommend When

Do not narrow the matcher in a way that bypasses required auth or routing behavior. Do not move middleware work into every route if the current matcher is already scoped.

Verification

State the current middleware share, the dominant matched paths, and the exact matcher line to change.