Package org.hawaiiframework.logging.util
Class ClientIpResolver
java.lang.Object
org.hawaiiframework.logging.util.ClientIpResolver
Utility class to determine the client IP address.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionClientIpResolver(String frontendIpHeader) Create a new instance of the ClientIpResolver. -
Method Summary
Modifier and TypeMethodDescriptiongetClientIp(jakarta.servlet.http.HttpServletRequest request) Extract the client IP address from the HttpServletRequest.
-
Constructor Details
-
ClientIpResolver
Create a new instance of the ClientIpResolver.- Parameters:
frontendIpHeader- if present, this header's value will be used as the client IP address.
-
-
Method Details
-
getClientIp
Extract the client IP address from the HttpServletRequest.- Parameters:
request- the request- Returns:
- the IP address
-