logger : log the readl client address when using a proxy
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2094 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -67,10 +67,10 @@ class logger
|
|||||||
for ($i = 0 ; $i <= $this->backTraceSkip ; $i++)
|
for ($i = 0 ; $i <= $this->backTraceSkip ; $i++)
|
||||||
$back = array_shift ($backtrace);
|
$back = array_shift ($backtrace);
|
||||||
$msg = "";
|
$msg = "";
|
||||||
if (isset ($_SERVER["REMOTE_ADDR"]))
|
if (isset ($_SERVER["HTTP_X_FORWARDED_FOR"]))
|
||||||
{
|
$msg .= "[".$_SERVER["HTTP_X_FORWARDED_FOR"]."] ";
|
||||||
|
elseif (isset ($_SERVER["REMOTE_ADDR"]))
|
||||||
$msg .= "[".$_SERVER["REMOTE_ADDR"]."] ";
|
$msg .= "[".$_SERVER["REMOTE_ADDR"]."] ";
|
||||||
}
|
|
||||||
|
|
||||||
// The messages are all the parameters of the function except the first,
|
// The messages are all the parameters of the function except the first,
|
||||||
// which is the priority
|
// which is the priority
|
||||||
|
|||||||
Reference in New Issue
Block a user