public class HttpsAwareFiltersAdapter
extends org.littleshoot.proxy.HttpFiltersAdapter
getHttpsRequestHostAndPort() and getHttpsOriginalRequestHostAndPort() methods can only be
called when the request is an HTTPS request. Otherwise they will throw an IllegalStateException.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HOST_ATTRIBUTE_NAME |
static java.lang.String |
IS_HTTPS_ATTRIBUTE_NAME |
static java.lang.String |
ORIGINAL_HOST_ATTRIBUTE_NAME |
| Constructor and Description |
|---|
HttpsAwareFiltersAdapter(io.netty.handler.codec.http.HttpRequest originalRequest,
io.netty.channel.ChannelHandlerContext ctx) |
| Modifier and Type | Method and 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.
|
clientToProxyRequest, proxyToClientResponse, proxyToServerConnectionFailed, proxyToServerConnectionQueued, proxyToServerConnectionSSLHandshakeStarted, proxyToServerConnectionStarted, proxyToServerConnectionSucceeded, proxyToServerRequest, proxyToServerRequestSending, proxyToServerRequestSent, proxyToServerResolutionFailed, proxyToServerResolutionStarted, proxyToServerResolutionSucceeded, serverToProxyResponse, serverToProxyResponseReceived, serverToProxyResponseReceiving, serverToProxyResponseTimedOutpublic static final java.lang.String IS_HTTPS_ATTRIBUTE_NAME
public static final java.lang.String HOST_ATTRIBUTE_NAME
public static final java.lang.String ORIGINAL_HOST_ATTRIBUTE_NAME
public HttpsAwareFiltersAdapter(io.netty.handler.codec.http.HttpRequest originalRequest,
io.netty.channel.ChannelHandlerContext ctx)
public boolean isHttps()
public java.lang.String getFullUrl(io.netty.handler.codec.http.HttpRequest modifiedRequest)
modifiedRequest - a possibly-modified version of the request currently being processedpublic java.lang.String getOriginalUrl()
public java.lang.String getHost(io.netty.handler.codec.http.HttpRequest modifiedRequest)
modifiedRequest - a possibly-modified version of the request currently being processedpublic java.lang.String getHostAndPort(io.netty.handler.codec.http.HttpRequest modifiedRequest)
modifiedRequest - a possibly-modified version of the request currently being processed