Class HttpsAwareFiltersAdapter

    • Constructor Summary

      Constructors 
      Constructor Description
      HttpsAwareFiltersAdapter​(io.netty.handler.codec.http.HttpRequest originalRequest, io.netty.channel.ChannelHandlerContext ctx)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFullUrl​(io.netty.handler.codec.http.HttpRequest modifiedRequest)
      Returns the full, absolute URL of the specified request for both HTTP and HTTPS URLs.
      java.lang.String getHost​(io.netty.handler.codec.http.HttpRequest modifiedRequest)
      Returns the hostname (but not the port) the specified request for both HTTP and HTTPS requests.
      java.lang.String getHostAndPort​(io.netty.handler.codec.http.HttpRequest modifiedRequest)
      Returns the host and port of the specified request for both HTTP and HTTPS requests.
      java.lang.String getOriginalUrl()
      Returns the full, absolute URL of the original request from the client for both HTTP and HTTPS URLs.
      boolean isHttps()
      Returns true if this is an HTTPS request.
      • Methods inherited from class org.littleshoot.proxy.HttpFiltersAdapter

        clientToProxyRequest, 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
    • Field Detail

      • IS_HTTPS_ATTRIBUTE_NAME

        public static final java.lang.String IS_HTTPS_ATTRIBUTE_NAME
        See Also:
        Constant Field Values
      • HOST_ATTRIBUTE_NAME

        public static final java.lang.String HOST_ATTRIBUTE_NAME
        See Also:
        Constant Field Values
      • ORIGINAL_HOST_ATTRIBUTE_NAME

        public static final java.lang.String ORIGINAL_HOST_ATTRIBUTE_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • HttpsAwareFiltersAdapter

        public HttpsAwareFiltersAdapter​(io.netty.handler.codec.http.HttpRequest originalRequest,
                                        io.netty.channel.ChannelHandlerContext ctx)
    • Method Detail

      • isHttps

        public boolean isHttps()
        Returns true if this is an HTTPS request.
        Returns:
        true if https, false if http
      • getFullUrl

        public java.lang.String getFullUrl​(io.netty.handler.codec.http.HttpRequest modifiedRequest)
        Returns the full, absolute URL of the specified request for both HTTP and HTTPS URLs. The request may reflect modifications from this or other filters. This filter instance must be currently handling the specified request; otherwise the results are undefined.
        Parameters:
        modifiedRequest - a possibly-modified version of the request currently being processed
        Returns:
        the full URL of the request, including scheme, host, port, path, and query parameters
      • getOriginalUrl

        public java.lang.String getOriginalUrl()
        Returns the full, absolute URL of the original request from the client for both HTTP and HTTPS URLs. The URL will not reflect modifications from this or other filters.
        Returns:
        the full URL of the original request, including scheme, host, port, path, and query parameters
      • getHost

        public java.lang.String getHost​(io.netty.handler.codec.http.HttpRequest modifiedRequest)
        Returns the hostname (but not the port) the specified request for both HTTP and HTTPS requests. The request may reflect modifications from this or other filters. This filter instance must be currently handling the specified request; otherwise the results are undefined.
        Parameters:
        modifiedRequest - a possibly-modified version of the request currently being processed
        Returns:
        hostname of the specified request, without the port
      • getHostAndPort

        public java.lang.String getHostAndPort​(io.netty.handler.codec.http.HttpRequest modifiedRequest)
        Returns the host and port of the specified request for both HTTP and HTTPS requests. The request may reflect modifications from this or other filters. This filter instance must be currently handling the specified request; otherwise the results are undefined.
        Parameters:
        modifiedRequest - a possibly-modified version of the request currently being processed
        Returns:
        host and port of the specified request