This commit is contained in:
Marius Karstedt
2021-03-22 11:18:16 +01:00
parent 24f7e3ab13
commit 1e0417b249
+3 -3
View File
@@ -175,9 +175,9 @@ class Request
$client_header = $this->getHeader('http-x-forwarded-for'); $client_header = $this->getHeader('http-x-forwarded-for');
} }
} }
if($client_header !== null && filter_var($client_header, FILTER_VALIDATE_IP)) if($client_header === null)
return $client_header; $client_header = $this->getHeader('remote-addr');
return $this->getHeader('remote-addr'); return filter_var($client_header, FILTER_VALIDATE_IP) ? $client_header : null;
} }
/** /**