Package co.datadome.api.common
Class DataDomeRequestConsumer
java.lang.Object
co.datadome.api.common.DataDomeRequestConsumer
-
Constructor Summary
ConstructorsConstructorDescriptionDataDomeRequestConsumer(DataDomeService dataDomeService, String regex, String exclusionRegex, Collection<String> skipIps, boolean useXForwardedHost) DataDomeRequestConsumer(DataDomeService dataDomeService, String regex, String exclusionRegex, Collection<String> skipIps, boolean useXForwardedHost, boolean useForwarded) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(HttpRequest httpRequest) buildDataDomeRequest(HttpRequest request) protected static List<IpAddressMatcher>convertToSubnet(Collection<String> subnets) getRegex()longprotected booleanisRegexMatched(String uri) booleanprotected static booleanmatchSubnets(String ip, List<IpAddressMatcher> subnetMatchers) parseForwardedHeader(String forwarded) Parse the forwarded header and returns a map with its fields
-
Constructor Details
-
DataDomeRequestConsumer
public DataDomeRequestConsumer(DataDomeService dataDomeService, String regex, String exclusionRegex, Collection<String> skipIps, boolean useXForwardedHost) -
DataDomeRequestConsumer
public DataDomeRequestConsumer(DataDomeService dataDomeService, String regex, String exclusionRegex, Collection<String> skipIps, boolean useXForwardedHost, boolean useForwarded)
-
-
Method Details
-
getRegex
-
getExclusionRegex
-
isUseXForwardedHost
public boolean isUseXForwardedHost() -
convertToSubnet
-
matchSubnets
-
accept
- Throws:
IOExceptionjakarta.servlet.ServletException
-
isRegexMatched
-
buildDataDomeRequest
-
getRequestBuilder
-
getRequestTimeStampInMicro
public long getRequestTimeStampInMicro() -
getSubnetMatchers
-
parseForwardedHeader
Parse the forwarded header and returns a map with its fields- Parameters:
forwarded- - header value- Returns:
- Map
-