When used behind Haproxy, piwigo logs haproxy ip address as visitors source ip address instead of visitors real ip address. This was described in piwigo forum by docofchaos in september 2016. Docofchaos also proposed a fix :
edit functions.inc.php in /usr/local/www/apache24/includes:
This fixed the problem for me in piwigo 14.2.0 (freebsd implementation)
When used behind Haproxy, piwigo logs haproxy ip address as visitors source ip address instead of visitors real ip address. This was described in piwigo forum by docofchaos in september 2016. Docofchaos also proposed a fix :
edit functions.inc.php in /usr/local/www/apache24/includes:
comment $ip = $_SERVER['REMOTE_ADDR'];
and insert
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
This fixed the problem for me in piwigo 14.2.0 (freebsd implementation)
<!-- github-sync-id:2116522641 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When used behind Haproxy, piwigo logs haproxy ip address as visitors source ip address instead of visitors real ip address. This was described in piwigo forum by docofchaos in september 2016. Docofchaos also proposed a fix :
edit functions.inc.php in /usr/local/www/apache24/includes:
comment $ip = $_SERVER['REMOTE_ADDR'];
and insert
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
This fixed the problem for me in piwigo 14.2.0 (freebsd implementation)