Altering the remote IP logging to use the x-forwarded-for header from the nginx proxy

This commit is contained in:
Christian 'ketura' McCarty
2021-03-20 12:00:05 -05:00
parent ee3ad99f5b
commit 1ceb8e5775

View File

@@ -84,7 +84,7 @@ public class GempukkuHttpRequestHandler extends SimpleChannelInboundHandler<Full
uri = uri.substring(0, uri.indexOf("?"));
final RequestInformation requestInformation = new RequestInformation(httpRequest.getUri(),
((InetSocketAddress) ctx.channel().remoteAddress()).getAddress().getHostAddress(),
httpRequest.headers().get("[X-Forwarded-For]"),
System.currentTimeMillis());
ResponseSender responseSender = new ResponseSender(ctx, httpRequest);