Re: [squid-users] HTTP Header

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 09 Jan 2009 22:40:18 +1300

Mehmet ÇELiK wrote:
>> In your vBulletin includes/init.php file change "define('IPADDRESS',
>> $_SERVER['REMOTE_ADDR']);" to "define('IPADDRESS',
>> $_SERVER['HTTP_X_FORWARDED_FOR']);".
>>
>
> No. I don't this. Because, this is not right method..
>
>

In my PHP-apps I do the equivalent of this:

if ($trust_XFF && $_SERVER['HTTP_X_FORWARDED_FOR'])
   define('IPADDRESS', $_SERVER['HTTP_X_FORWARDED_FOR']);
else
   define('IPADDRESS', $_SERVER['REMOTE_ADDR']);

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE5 or 3.0.STABLE11
   Current Beta Squid 3.1.0.3
Received on Fri Jan 09 2009 - 09:41:56 MST

This archive was generated by hypermail 2.2.0 : Fri Jan 09 2009 - 12:00:02 MST