Class 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.
    • 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.HttpResponse clientToProxyRequest​(io.netty.handler.codec.http.HttpObject httpObject)  
      • Methods inherited from class org.littleshoot.proxy.HttpFiltersAdapter

        proxyToClientResponse, proxyToServerConnectionFailed, proxyToServerConnectionQueued, proxyToServerConnectionSSLHandshakeStarted, proxyToServerConnectionStarted, proxyToServerConnectionSucceeded, proxyToServerRequest, proxyToServerRequestSending, proxyToServerRequestSent, proxyToServerResolutionFailed, proxyToServerResolutionStarted, proxyToServerResolutionSucceeded, serverToProxyResponse, serverToProxyResponseReceived, serverToProxyResponseReceiving, serverToProxyResponseTimedOut
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WhitelistFilter

        public 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 Detail

      • clientToProxyRequest

        public io.netty.handler.codec.http.HttpResponse clientToProxyRequest​(io.netty.handler.codec.http.HttpObject httpObject)
        Specified by:
        clientToProxyRequest in interface org.littleshoot.proxy.HttpFilters
        Overrides:
        clientToProxyRequest in class org.littleshoot.proxy.HttpFiltersAdapter