Sorry, I have mixed names…
- Next.js has a Middleware function run before the request reaches the app,
- Edge Middleware is a brand name of a Vercel service that runs Next.js middleware functions on the Edge Network.
In most of the examples, articles, and on Next.js Conf “Edge Middleware” name is used and this probably made me confused ![]()
Now I know that Next.js app together with the middleware function can be deployed anywhere. We have deployed it on Google Cloud Run and it works.
Of course, I understand that keeping middleware together with our App in the normal Docker container is not best for performance, so Vercel Edge Middleware could boost our performance.