Class RewriteUrlFilter

  • All Implemented Interfaces:
    org.littleshoot.proxy.HttpFilters

    public class RewriteUrlFilter
    extends HttpsAwareFiltersAdapter
    Applies rewrite rules to the specified request. If a rewrite rule matches, the request's URI will be overwritten with the rewritten URI. The filter does not make a defensive copy of the rewrite rule collection, so there is no guarantee that the collection at the time of construction will contain the same values when the filter is actually invoked, if the collection is modified concurrently.
    • Constructor Summary

      Constructors 
      Constructor Description
      RewriteUrlFilter​(io.netty.handler.codec.http.HttpRequest originalRequest, io.netty.channel.ChannelHandlerContext ctx, java.util.Collection<RewriteRule> rewriteRules)  
    • 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

      • RewriteUrlFilter

        public RewriteUrlFilter​(io.netty.handler.codec.http.HttpRequest originalRequest,
                                io.netty.channel.ChannelHandlerContext ctx,
                                java.util.Collection<RewriteRule> rewriteRules)
    • 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