Issue with X-Forwarded-For in Edgemicro

Not applicable

Hi,


Firstly, Congratulations on the google acquisition.

Now to the issue:

We are seeing an issue with X-Forwarded-For header in Edgemicro. We created a proxy to httpbin.org.

It seems to be adding an 'undefined' in front of the following headers as shown below -

"X-Forwarded-For": "undefined::ffff.<ip_address>, 52.x.x.x",

"X-Forwarded-Host": "undefined<host>"

I have masked our ip and host in this example.

It seems to be a configuration/setup issue. Can you please suggest what could be wrong.

Thanks,

Jaskaran

0 5 302
5 REPLIES 5

Former Community Member
Not applicable

Does in the incoming request have the X-Forwarded-For header?

No @Srinandan Sridhar

The request is curl directly to edge micro endpoint without any headers.

Former Community Member
Not applicable

I think that is why we are seeing the "undefined". The code appends to the header (it assumes the header is present if X-Forwarded-For is set to true in the config.yaml file).

Ok. This seems like a bug. But I guess we can proceed by turning it off in the configurations. As it still adds the X-Forwarded-For that are incoming in the chain.

Not applicable

This bug is being tracked here: https://github.com/apigee/microgateway-core/pull/12

A fix is already in place and will likely go out with the next release.

Thanks!