Altering the remote IP logging to use the x-forwarded-for header from the nginx proxy
This commit is contained in:
@@ -84,7 +84,7 @@ public class GempukkuHttpRequestHandler extends SimpleChannelInboundHandler<Full
|
|||||||
uri = uri.substring(0, uri.indexOf("?"));
|
uri = uri.substring(0, uri.indexOf("?"));
|
||||||
|
|
||||||
final RequestInformation requestInformation = new RequestInformation(httpRequest.getUri(),
|
final RequestInformation requestInformation = new RequestInformation(httpRequest.getUri(),
|
||||||
((InetSocketAddress) ctx.channel().remoteAddress()).getAddress().getHostAddress(),
|
httpRequest.headers().get("[X-Forwarded-For]"),
|
||||||
System.currentTimeMillis());
|
System.currentTimeMillis());
|
||||||
|
|
||||||
ResponseSender responseSender = new ResponseSender(ctx, httpRequest);
|
ResponseSender responseSender = new ResponseSender(ctx, httpRequest);
|
||||||
|
|||||||
Reference in New Issue
Block a user