@CompileStatic class ClientIpAddressExtractor extends Object
Contains utility method trying to extract client's IP Address if possible.
Type | Name and description |
---|---|
static List<String> |
IP_HEADER_CANDIDATE_LIST The list of known HTTP headers used for carrying proxy server and original visitor IP addresses. |
Constructor and description |
---|
ClientIpAddressExtractor() |
Type Params | Return Type | Name and description |
---|---|---|
|
static String |
extractClientIpAddress(jakarta.servlet.http.HttpServletRequest httpServletRequest) Tries to extract client's IP address by inspecting known HTTP headers. |
Tries to extract client's IP address by inspecting known HTTP headers.
UsesHttpServletRequest.getRemoteAddr()
as a fallback.
Groovy Documentation