Re: Include client IP address in rewritten URL

From: Shawn Heisey <haproxy#elyograg.org>
Date: Tue, 14 Dec 2010 08:22:12 -0700


The Apache instances run under Windows, and the application is a homegrown windows executable CGI. It's my opinion that the OS choice is the entire problem, but it's not something we can change without a complete rewrite of major systems.

I'm a sysadmin, not a developer! I will talk to the developer about modifying his code. I was hoping to simply duplicate the current functionality so that they would not need to do that. The X-Forwarded-For header should be sent through to the CGI, right? I don't think this is the end of the world.

Thanks,
Shawn

On 12/14/2010 12:04 AM, Anze wrote:
> This might be obvious, but still:
> all of the programming languages I know of can access REMOTE_ADDR even if they
> don't get it via GET vars. For instance, in PHP you can get it from
> $_SERVER['REMOTE_ADDR']. So there should be no need to use GET vars, just
> change the way you access the data. The change should be trivial.
>
> If the code is not yours and you are not allowed to change it, there could
> still be some way to fix this. For instance, in PHP you could try
> autoprepending this code:
> <?php
> $_REQUEST['REMOTE_ADDR'] = $_GET['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR'];
> ?>
> That's ugly, of course, but it should still be much faster than Apache
> rewrite.
Received on 2010/12/14 16:22

This archive was generated by hypermail 2.2.0 : 2010/12/14 16:30 CET