Skip sending request bodies to Routing Middleware
Vercel introduced a setting to skip sending request bodies to Routing Middleware, reducing Fast Origin Transfer usage and potentially improving response times for large payloads.
Vercel now allows developers to skip forwarding client request bodies to Routing Middleware using the skipMiddlewareRequestBody option. This change reduces incoming Fast Origin Transfer usage during middleware invocations, which may improve time to first byte for requests with large bodies. The feature is intended for use cases where Routing Middleware does not require access to the request body.
To implement this setting, developers must configure it in vercel.json or vercel.ts, depending on their project setup. The option must be explicitly enabled, as it defaults to false and does not affect existing deployments unless activated. Vercel Functions and rewrite targets continue to receive the request body, ensuring backward compatibility for body processing.
The configuration requires redeploying the project for the change to take effect. This ensures the updated routing behavior is applied to incoming requests. Projects using TypeScript should apply the setting in vercel.ts instead of vercel.json.
The new option provides a targeted optimization for middleware-heavy applications, particularly those handling large payloads. It does not alter how Vercel Functions or rewrite targets handle request bodies, maintaining consistency in body processing workflows.