Enhancement request for realip module

Is there any way to make the “real_ip_header” accept -any- header,
instead of only X-Forwarded-For and X-Real-IP?

I have a site on nginx behind Akamai, and they transmit a
“True-Client_IP” header with the actual client IP.

They send X-Forwarded-For as well, but it appears it might not be
legitimate.

I’m thinking this is pretty simple… I assume it’s only a couple
lines of code to change…

Thanks,
mike

Hi Mike,

I posted a patch a while ago that implements this, see
http://wiki.codemongers.com/NginxModules?action=AttachFile&do=get&target=realip.patch

I think there was a bug with this patch that gives a segfault in some
conditions, if you’re interested I can dig the fixed version and
upload it.

Cheers,

On Thu, Sep 25, 2008 at 2:09 AM, Joaquin Cuenca Abela
[email protected] wrote:

Hi Mike,

I posted a patch a while ago that implements this, see
http://wiki.codemongers.com/NginxModules?action=AttachFile&do=get&target=realip.patch

I think there was a bug with this patch that gives a segfault in some
conditions, if you’re interested I can dig the fixed version and
upload it.

Hi!

If it were up to me, I’d like to see it get fixed and merged into the
next 0.7.x release :slight_smile: (I’m sure Igor or Maxim could fix whatever the
issue is with it in an instant before merging…)

On Wed, Sep 24, 2008 at 09:36:15PM -0700, mike wrote:

Is there any way to make the “real_ip_header” accept -any- header,
instead of only X-Forwarded-For and X-Real-IP?

I have a site on nginx behind Akamai, and they transmit a
“True-Client_IP” header with the actual client IP.

They send X-Forwarded-For as well, but it appears it might not be legitimate.

I’m thinking this is pretty simple… I assume it’s only a couple
lines of code to change…

The attached patch allows any header in “real_ip_header”:

 real_ip_header  True-Client_IP;

Thanks Igor!

To the rest of the list - I think my akamai guy mistyped it to me. It
actually appears to be “True-Client-IP” I think. That one seems to be
working properly :slight_smile: