just look for X-Forwarded-For in your request header. if you're using express.js something like this should work:
X-Forwarded-For
app.get('/get/ip', function (req, res) { const ipAddress = req.headers['x-forwarded-for']?.split(',').shift() || req.socket?.remoteAddress res.send(ipAddress); })
So if I make a http request to the end I will get the public IP address?
yes, it's show you the IP address of a client connecting to your web server (which in your case is Express.js) developer.mozilla.org/en-US/docs/W...
Will try it out Thank you so much 🥰❤️
get-ip-eight.vercel.app/ working thanks anyway to get ip location without third party api
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
just look for
X-Forwarded-For
in your request header.if you're using express.js something like this should work:
So if I make a http request to the end I will get the public IP address?
yes, it's show you the IP address of a client connecting to your web server (which in your case is Express.js)
developer.mozilla.org/en-US/docs/W...
Will try it out
Thank you so much 🥰❤️
get-ip-eight.vercel.app/ working thanks
anyway to get ip location without third party api