Logging X-Forwarded For Header

In cases where TYK Gateway is behind a Proxy server like Elastic load balancer (AWS), the origin ip shown in the logs are of the proxy’s rather than the actual client IP.
Can we have X-Forwarded-For printed in the logs? This would help track the actual client ip address.
HTTP headers and Classic Load Balancers - Elastic Load Balancing.

Preferably on both Dashboard and Gateway application.

This will be in the next version :slight_smile:

1 Like

The analytics record doesn’t seem to store the X-Forwarded-For in the IP, but the load balancer IP only, but the logs have user_ip=“Originated_IP,LB_IP” ( in case of handler_error.go)

Please validate and Provide a fix this - on both handler success and handler error.

@Martin & Team - Let me know if I should file a bug on GH.

You can raise an issue in GH, Tyk is an open source project, but this is not how to request the team to expend effort on a feature