Why does Kong API Gateway remove X-Forwarded-For headers when forwarding request to backend?

3.5k Views Asked by At

I am trying to forward the X-Forwarded-For header containing the IP address of the client to the backend services but it seems Kong does not allow that to happen, I can read the IP address of the client when I log them in Kong logs, however, every attempt to add X-Forwarded-For header into the request to backend has failed, anyone know why that is?

I have this in my kong configuration file

trusted_ips = 0.0.0.0/0,::/0
real_ip_header = X-Forwarded-For
0

There are 0 best solutions below