How can I configure the x-forwarded-for header in nginx?

Sorry, I don’t know enough about your app to help you further. The docs of AWS Lambda, or Vercel, should tell you how to get the user’s IP address from the request; I don’t think a 3rd party IP address lookup service is useful here