Under some circumstances the X-Forwarded-For header can include multiple values, in which case, an exception is happening and it is not possible to get the IP.
We need to:
Properly handle multi-value scenario by getting the first one from the list.
This issue has been automatically marked as stale because it has not had activity within the past 90 days. It will be closed in 30 days no further activity occurs. Thank you.
Under some circumstances the X-Forwarded-For header can include multiple values, in which case, an exception is happening and it is not possible to get the IP.
We need to:
InetAddress.getByName(ip);
. (we could use https://commons.apache.org/proper/commons-validator/javadocs/api-1.5.1/org/apache/commons/validator/routines/InetAddressValidator.html)