We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22e69e7 commit 5b21226Copy full SHA for 5b21226
src/main/php/com/selfcoders/phpdyndns/IPUtils.php
@@ -5,8 +5,8 @@ class IPUtils
5
{
6
public static function getClientIP($trustedProxies = [])
7
8
- if (isset($_SERVER["X_FORWARDED_FOR"]) and in_array($_SERVER["REMOTE_ADDR"], $trustedProxies)) {
9
- $ips = explode(",", $_SERVER["X_FORWARDED_FOR"]);
+ if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]) and in_array($_SERVER["REMOTE_ADDR"], $trustedProxies)) {
+ $ips = explode(",", $_SERVER["HTTP_X_FORWARDED_FOR"]);
10
return trim(end($ips));
11
}
12
0 commit comments