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 String |
HOST_ATTRIBUTE_NAME |
static String |
IS_HTTPS_ATTRIBUTE_NAME |
static 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 |
---|---|
String |
getFullUrl(io.netty.handler.codec.http.HttpRequest modifiedRequest)
Returns the full, absolute URL of the specified request for both HTTP and HTTPS URLs.
|
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.
|
String |
getHostAndPort(io.netty.handler.codec.http.HttpRequest modifiedRequest)
Returns the host and port of the specified request for both HTTP and HTTPS requests.
|
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, serverToProxyResponseTimedOut
public static final String IS_HTTPS_ATTRIBUTE_NAME
public static final String HOST_ATTRIBUTE_NAME
public static final String ORIGINAL_HOST_ATTRIBUTE_NAME
public HttpsAwareFiltersAdapter(io.netty.handler.codec.http.HttpRequest originalRequest, io.netty.channel.ChannelHandlerContext ctx)
public boolean isHttps()
public String getFullUrl(io.netty.handler.codec.http.HttpRequest modifiedRequest)
modifiedRequest
- a possibly-modified version of the request currently being processedpublic String getOriginalUrl()
public String getHost(io.netty.handler.codec.http.HttpRequest modifiedRequest)
modifiedRequest
- a possibly-modified version of the request currently being processedpublic String getHostAndPort(io.netty.handler.codec.http.HttpRequest modifiedRequest)
modifiedRequest
- a possibly-modified version of the request currently being processedCopyright © 2017. All rights reserved.