Hello I am trying to fetch IP. My application is running on Microsoft Azure so remoteIpAddr and remoteHost is saving Azure Frontdoor IP. Whereas ipAddress is null .. How to fetch the Client's IP ? How to know which header has that ?
Below is the code I am using
String remoteIpAddr = request.getRemoteAddr();
String remoteHost = request.getRemoteHost();
String ipAddress = request.getHeader("X-FORWARDED-FOR");