Next.js Discord

Discord Forum

How to Get Country in Middleware Without Vercel

Answered
beanbeanjuice posted this in #help-forum
Open in Discord
Avatar
Hello, I'm currently self-hosting using NGINX and NextJS 15. I noticed [here](https://nextjs.org/docs/app/building-your-application/upgrading/version-15#nextrequest-geolocation) that geolocation has been removed from NextRequest. What would be the alternative way to get the user's country in the middleware?
Answered by beanbeanjuice
I'm using this: https://ipinfo.io
View full answer

1 Reply

Avatar
I'm using this: https://ipinfo.io
Answer