Announcement

  •  » Requests
  •  » History/Logging with load balancer

#1 2020-03-05 20:28:34

piwigouser5646
Member
2020-03-05
1

History/Logging with load balancer

Hello,

I have my Piwigo installation behind a load balancer. When doing a history search, the results show the IP address of my load balancer instead of the remote clients IP.  I can fix this by manually editing include/functions.inc.php

diff functions.inc.php.bak functions.inc.php
455c455,456
<   $ip = $_SERVER['REMOTE_ADDR'];
---
>   //$ip = $_SERVER['REMOTE_ADDR'];
>   $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];

I would like to request an option to use the X-Forwarded-For header in-place of the IP address for a whitelisted set of trusted IP addresses (proxy/LB)

Piwigo version: 2.10.1
PHP version: 7.2.24
MySQL version: 5.5.64

Offline

 
  •  » Requests
  •  » History/Logging with load balancer

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact