0

Dear Stackoverflow Community,

is it possible to receive the user‘s IP address from the browser/ via browser‘s meta data? I‘ve been searching for a solution and just found suggestions like reading the user‘s IP address via a web service. We already have implemented a web service to read the IP address, however, there is a proxy inbetween the server and the client, thus we just get the IP address from the proxy. So we thought a possible solution could be reading the user’s IP address from the browser.

Thank you very much!

vauvau
  • 1
  • 1
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Feb 03 '22 at 10:47

1 Answers1

0

There's no standard way to retrieve the actual client IP address through a proxied connection. Some proxies insert a X-Forwarded-For header, some do it some other way and many obscure the client's address.

You can try querying the IP address from the user's browser via JavaScript, see this question.

Zac67
  • 2,761
  • 1
  • 10
  • 21