Skip sending request bodies to Routing Middleware

You can now skip sending client request bodies to Routing Middleware with skipMiddlewareRequestBody. This reduces incoming Fast Origin Transfer usage for middleware invocations and can improve time to first byte, especially for requests with large bodies.

Enable this option only if your Routing Middleware doesn’t read request bodies. Vercel Functions and rewrite targets still receive the body, so you can read and process it there.

Set skipMiddlewareRequestBody to true in your project’s JSON configuration file, vercel.json:

If you use a TypeScript configuration file, add the same setting to vercel.ts instead. This example assumes @vercel/config is installed:

Redeploy your project for the change to take effect. The option defaults to false, so existing projects are unchanged unless you enable it.

Read more in the skipMiddlewareRequestBody documentation.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论