request.getHeader(X_FORWARDED_FOR) could return a list of ip addresses separated by ,. We just need to extract the first one which is the original client ip address.
Coverage increased (+0.01%) to 41.759% when pulling bbdc34e3ae592181797a00c61a6a123abcd180eb on issue_575_2_ip_addresses into 159350f8bef062eea8be9e5af09352779cce526b on develop.
…ses.
For https://github.com/AtlasOfLivingAustralia/biocache-service/issues/575
According to https://github.com/AtlasOfLivingAustralia/logger-service/blob/bce9dfecbd29504b2a98e4fd3dc45107ed4c9de7/grails-app/controllers/au/org/ala/logger/IpAddressInterceptor.groovy#L20
and https://serverfault.com/questions/846489/can-x-forwarded-for-contain-multiple-ips
request.getHeader(X_FORWARDED_FOR)
could return a list of ip addresses separated by,
. We just need to extract the first one which is the original client ip address.