Package com.browserup.bup.filters
Class WhitelistFilter
- java.lang.Object
-
- org.littleshoot.proxy.HttpFiltersAdapter
-
- com.browserup.bup.filters.HttpsAwareFiltersAdapter
-
- com.browserup.bup.filters.WhitelistFilter
-
- All Implemented Interfaces:
org.littleshoot.proxy.HttpFilters
public class WhitelistFilter extends HttpsAwareFiltersAdapter
Checks this request against the whitelist, and returns the modified response if the request is not in the whitelist. The filter does not make a defensive copy of the whitelist URLs, so there is no guarantee that the whitelist URLs at the time of construction will contain the same values when the filter is actually invoked, if the URL collection is modified concurrently.
-
-
Field Summary
-
Fields inherited from class com.browserup.bup.filters.HttpsAwareFiltersAdapter
HOST_ATTRIBUTE_NAME, IS_HTTPS_ATTRIBUTE_NAME, ORIGINAL_HOST_ATTRIBUTE_NAME
-
-
Constructor Summary
Constructors Constructor Description WhitelistFilter(io.netty.handler.codec.http.HttpRequest originalRequest, io.netty.channel.ChannelHandlerContext ctx, boolean whitelistEnabled, int whitelistResponseCode, java.util.Collection<java.util.regex.Pattern> whitelistUrls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.handler.codec.http.HttpResponseclientToProxyRequest(io.netty.handler.codec.http.HttpObject httpObject)-
Methods inherited from class com.browserup.bup.filters.HttpsAwareFiltersAdapter
getFullUrl, getHost, getHostAndPort, getOriginalUrl, isHttps
-
Methods inherited from class org.littleshoot.proxy.HttpFiltersAdapter
proxyToClientResponse, proxyToServerConnectionFailed, proxyToServerConnectionQueued, proxyToServerConnectionSSLHandshakeStarted, proxyToServerConnectionStarted, proxyToServerConnectionSucceeded, proxyToServerRequest, proxyToServerRequestSending, proxyToServerRequestSent, proxyToServerResolutionFailed, proxyToServerResolutionStarted, proxyToServerResolutionSucceeded, serverToProxyResponse, serverToProxyResponseReceived, serverToProxyResponseReceiving, serverToProxyResponseTimedOut
-
-
-
-
Method Detail
-
clientToProxyRequest
public io.netty.handler.codec.http.HttpResponse clientToProxyRequest(io.netty.handler.codec.http.HttpObject httpObject)
- Specified by:
clientToProxyRequestin interfaceorg.littleshoot.proxy.HttpFilters- Overrides:
clientToProxyRequestin classorg.littleshoot.proxy.HttpFiltersAdapter
-
-