Migrating middleware.ts to proxy.ts in Next.js 16? Here's what actually changes
Next.js 16 swaps middleware.ts for proxy.ts, and it's not just a rename. The export shape changes (a default export named proxy instead of a named middleware function), and the default runtime flips from Edge to Node.js. That runtime change is where things get interesting. A handful of Edge-runtime-specific patterns don't automatically carry over cleanly: request.geo, request.ip, an explicit runtime: 'edge' config, streamed Response objects, and WASM imports. None of these break the migration ou

