Class ClientIpResolver


  • public class ClientIpResolver
    extends Object
    Utility class to determine the client IP address.
    Since:
    2.0.0
    Author:
    Rutger Lubbers
    • Constructor Detail

      • ClientIpResolver

        public ClientIpResolver​(String frontendIpHeader)
        Create a new instance of the ClientIpResolver.
        Parameters:
        frontendIpHeader - if present, this header's value will be used as the client IP address.
    • Method Detail

      • getClientIp

        public String getClientIp​(javax.servlet.http.HttpServletRequest request)
        Extract the client IP address from the HttpServletRequest.
        Parameters:
        request - the request
        Returns:
        the IP address