GeoIP-lite with nuxt3
Im trying to use geoip-lite, but im getting this erro, what could be?
23 Replies
It looks like geoip-lite is built for Node and not for browser?
Ok, i create a server api but mu app its on vercel and its no getting the true user ip.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
im using this but return the current ip from where my app is
@SeatloN
my composable
Does this work
?
The vercel is returning the ip apparently where the application is. If I access it by using a VPN to test it, it always returns to the country where the application is.
are you doing this on server side?
i was doing it over .vue but ive tested it on
server/api/status
with its not returning the truth ipYeah I guess this won’t work on server side.
yeah but neather over server api
looks like vercel its hidden client ip
Vercel Documentation
Headers Included with Deployments
This reference covers the list of request, response, cache-control, and custom response headers included with deployments with Vercel.
Read the last line
just Enterprise only so
Could it be that if I create an api and call it, I will still receive the request with the vercel ip?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
@SeatloN
bro, I created a basic serverless here and when accessing with vercel, it takes another address
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
i dont know, very bizarre, if I access my endpoint through the browser (from the serverless) that I created, it takes the correct one, but if I call it either in the application directly in the route or in the project's api, it returns the address where the serverless it is
Is there any configuration I can test?
i saw this @SeatloN , i dont know if this has to do with my problem
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
🥹
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
@formigueiro Any success?
yes
i had to use vercel headers to get country