mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Add cf ip header to none save call
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user