@Override
public ZuulMessage create(SessionContext context, HttpServerRequest httpServerRequest)
{
String clientIp = getIpAddress(httpServerRequest.getNettyChannel());
String scheme = "http";
int port = ((InetSocketAddress) httpServerRequest.getNettyChannel().localAddress()).getPort();
String serverName = ((InetSocketAddress) httpServerRequest.getNettyChannel().localAddress()).getHostString();
HttpRequestMessage request = new HttpRequestMessage(
context,
httpServerRequest.getHttpVersion().text(),
httpServerRequest.getHttpMethod().name().toLowerCase(),
httpServerRequest.getUri(),
copyQueryParams(httpServerRequest),
copyHeaders(httpServerRequest),
clientIp,
scheme,
port,
serverName
);
request.storeOriginalRequestInfo();
return wrapBody(request, httpServerRequest);
}