Add cf ip header to none save call

This commit is contained in:
Marius Karstedt
2021-03-22 11:06:33 +01:00
parent 9897f66a25
commit 90a0ca2ee8

View File

@@ -165,10 +165,10 @@ class Request
*/
public function getIp(bool $safe = false): ?string
{
if ($this->getHeader('http-cf-connecting-ip') !== null) {
return $this->getHeader('http-cf-connecting-ip');
}
if(!$safe){
if ($this->getHeader('http-cf-connecting-ip') !== null) {
return $this->getHeader('http-cf-connecting-ip');
}
if($this->getHeader('http-client-ip') !== null){
return $this->getHeader('http-client-ip');
}