Skip to content
← Back to Changelog

Thursday, May 11th 2023

Automatic recursion protection for Vercel Serverless Functions

Posted by

Avatar for javivelasco

Javi Velasco

Software Engineer, Infrastructure

Avatar for schniz

Gal Schlezinger

Software Engineer, Infrastructure

Avatar for nuta

Seiya Nuta

Software Engineer

Vercel now has automatic recursion protection for:

This provides safety against your code inadvertently triggering itself repeatedly, incurring unintentional usage. Recursion protection supports using the http module or fetch in the Node.js runtime for Serverless Functions, both for user-defined code and dependencies. Requests using the bare Socket constructor are not protected against recursion.

Recursion protection is available free on all plans. It does not require any code changes in your application, but does require a new deployment. Outbound requests now include the x-vercel-id header of the request that originated the new fetch.

We’re continuing to invest in platform improvements to help developers understand and monitor usage and avoid unintended usage on the Vercel platform.