I Have created a sample website with react and nodejs. I want to fetch the user's IP address who fills the form(website form). I have used the below code on the backend for fetching IP.
const ip = req.headers['x-forwarded-for'] || req.socket.remoteAddress;
console.log('client ip', ip);
But not get success. Please, guys, suggest to me how to fetch the IP of the user without any other API( like https://ipgeolocation.abstractapi.com external API)