Even with the project deployed to Vercel, the “ip” property on the NextRequest request object in a Route Handler is undefined. I have a deployed website to prove this.
Website route: https://vercel-req-ip-test.vercel.app/api/ip
This page returns your ip by the request.ip and from the headers.
Source code: GitHub - Nic13Gamer/vercel-req-ip-test