Quantcast
Channel: SCN : Discussion List - Java Development
Viewing all articles
Browse latest Browse all 277

How to get client Ip Address in Java

$
0
0

Hi

I am getting some Private IP when I am trying to get my own IP. Its working fine in local but in production giving private IP instaed of My IP with the below code.

String ipAddress = request.getHeader("X-FORWARDED-FOR");

why it is giving different IP instead of my IP when i am hitting as a user in Production.

 

Thanks

Penchal


Viewing all articles
Browse latest Browse all 277

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>