diff --git a/src/Pecee/Http/Request.php b/src/Pecee/Http/Request.php index cbce8bd..d72ee3f 100644 --- a/src/Pecee/Http/Request.php +++ b/src/Pecee/Http/Request.php @@ -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'); }