Code of Conduct
Is there an existing issue for this?
GLPI Version
11.0.1
Plugin version
1.0
Bug description
IpAddressQuestion and HostnameQuestion use GLPI Toolbox::getRemoteIpAddress() to determine the user IP address.
It returns $_SERVER["REMOTE_ADDR"].
This is an issue when hosting GLPI behing a reverse proxy such as Traefik.
The correct value is this case is (as seen in GLPI's Auth.php):
$ip = getenv("HTTP_X_FORWARDED_FOR") ?: getenv("REMOTE_ADDR");
Please add an option to customize the env value used to get the user IP address.
Or add an EnvironmentVariableQuestion feature to allow querying HTTP headers.
Thank you for you work.