From 90a0ca2ee89342fb0e77578f17744673df726dd2 Mon Sep 17 00:00:00 2001 From: Marius Karstedt Date: Mon, 22 Mar 2021 11:06:33 +0100 Subject: [PATCH] Add cf ip header to none save call --- src/Pecee/Http/Request.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'); }