Package org.hawaiiframework.logging.util
Class ClientIpResolver
- java.lang.Object
-
- org.hawaiiframework.logging.util.ClientIpResolver
-
public class ClientIpResolver extends Object
Utility class to determine the client IP address.- Since:
- 2.0.0
- Author:
- Rutger Lubbers
-
-
Constructor Summary
Constructors Constructor Description ClientIpResolver(String frontendIpHeader)
Create a new instance of the ClientIpResolver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClientIp(javax.servlet.http.HttpServletRequest request)
Extract the client IP address from the HttpServletRequest.
-
-
-
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
-
-