Introducing the Vercel middleware

Last year, we have launched the managed instances, a great way to use without having to install and maintain the agent on your servers. With the managed instances, it takes a few clicks to get started with, and you can start monitoring and fixing your website's redirections in no time.

In certain setups, however, the backend service used to serve your website does not correctly handle the traffic coming from reverse proxies, and considers that a large amount of requests arriving from a specific range of IP addresses is suspicious. Automated security systems are perfectly right to be cautious, but in this case, it can lead to false positives, and the managed instances might be blocked by the backend service if it is not correctly configured to accept traffic from our managed instances.

This was the case with Vercel, a very popular platform to deploy websites and serverless functions. While perfectly working most of the time, we have recently begun to receive reports from users that a part of their traffic was being refused by their Vercel backend. After some investigation, we found that Vercel's security systems were blocking some of our managed instances IP addresses, and on some Vercel websites only. Sharing this information with Vercel, we have been able to confirm that the issue was due to the way Vercel's security systems were configured, and that it was possible to whitelist the managed instances IP addresses - except for Vercel Enterprise plan subscribers.

To make it easier and more reliable for our users to use with Vercel, we have developed a Vercel middleware that packages the Web Assembly version of the agent, that we already distribute as an open source project. This middleware is a small piece of code that you can add to your Vercel project, and that will automatically handle the incoming requests and apply the rules configured in your project.

Deploying the Vercel middleware requires developer access to your Vercel project and can be done in a few steps:

  1. Install the Vercel middleware in your Vercel application;
    $ npm install
    // or with yarn
    $ yarn add
  2. The Vercel setting page to add the REDIRECTIONIO_TOKEN environment variableConfigure the Vercel middleware with your project's key as a Vercel environment variable named REDIRECTIONIO_TOKEN;
  3. Enable the middleware in your Vercel application
    // src/middleware.ts
    import redirectionioMiddleware from '';
    export default redirectionioMiddleware;
    export const config = {
        unstable_allowDynamic: [
  4. Deploy your Vercel application.

That's it! Your Vercel application is now using the Vercel middleware, and you can start monitoring and fixing your website's redirections in no time.

👉 Read our complete documentation about the Vercel Middleware.

The Vercel middelware package is available as an open-source package on our GitHub page.