@@ -115,7 +115,7 @@ protected $value;
115115### Methods
116116
117117``` php
118- public function __construct( string $name, mixed $value = null, int $expire = int, string $path = string, bool $secure = null , string $domain = null , bool $httpOnly = null , array $options = [] );
118+ public function __construct( string $name, mixed $value = null, int $expire = int, string $path = string, bool $secure = bool , string $domain = string , bool $httpOnly = bool , array $options = [] );
119119```
120120Phalcon\Http\Cookie constructor.
121121
@@ -717,6 +717,11 @@ private $rawBody = ;
717717 */
718718private $strictHostCheck = false;
719719
720+ /**
721+ * @var array
722+ */
723+ private $trustedProxies;
724+
720725```
721726
722727### Methods
@@ -772,11 +777,11 @@ _SERVER["HTTP_ACCEPT_LANGUAGE"]
772777
773778
774779``` php
775- public function getClientAddress( bool $trustForwardedHeader = bool ): string | bool ;
780+ public function getClientAddress( bool $trustForwardedHeader = bool ): string | false ;
776781```
777- Gets most possible client IPv4 Address. This method searches in
782+ Gets most possible client IP Address. This method searches in
778783` $_SERVER["REMOTE_ADDR"] ` and optionally in
779- ` $_SERVER["HTTP_X_FORWARDED_FOR"] `
784+ ` $_SERVER["HTTP_X_FORWARDED_FOR"] ` and returns the first non-private or non-reserved IP address
780785
781786
782787``` php
@@ -832,7 +837,7 @@ Retrieves a query/get value always sanitized with the preset filters
832837``` php
833838public function getHTTPReferer(): string;
834839```
835- Gets web page that refers active request. ie: https ://www.google.com
840+ Gets web page that refers active request. ie: http ://www.google.com
836841
837842
838843``` php
@@ -980,13 +985,13 @@ Note: This method relies on the `$_SERVER["HTTP_ACCEPT_LANGUAGE"]` header.
980985``` php
981986public function getPut( string $name = null, mixed $filters = null, mixed $defaultValue = null, bool $notAllowEmpty = bool, bool $noRecursive = bool ): mixed;
982987```
983- Gets a variable from put request
988+ Gets a variable from the PUT request
984989
985990``` php
986- // Returns value from $_PUT["user_email"] without sanitizing
991+ // Returns value from PUT stream without sanitizing
987992$userEmail = $request->getPut("user_email");
988993
989- // Returns value from $_PUT["user_email"] with sanitizing
994+ // Returns value from PUT stream with sanitizing
990995$userEmail = $request->getPut("user_email", "email");
991996```
992997
@@ -1247,6 +1252,12 @@ Sets if the `Request::getHttpHost` method must be use strict validation
12471252of host name or not
12481253
12491254
1255+ ``` php
1256+ public function setTrustedProxies( array $trustedProxies ): RequestInterface;
1257+ ```
1258+ Set trusted proxy
1259+
1260+
12501261``` php
12511262final protected function getBestQuality( array $qualityParts, string $name ): string;
12521263```
@@ -1272,6 +1283,12 @@ final protected function hasFileHelper( mixed $data, bool $onlySuccessful ): lon
12721283Recursively counts file in an array of files
12731284
12741285
1286+ ``` php
1287+ protected function isIpAddressInCIDR( string $ip, string $cidr ): bool;
1288+ ```
1289+ Check if an IP address exists in CIDR range
1290+
1291+
12751292``` php
12761293protected function resolveAuthorizationHeaders(): array;
12771294```
@@ -1642,7 +1659,7 @@ $_SERVER["PHP_AUTH_DIGEST"]
16421659``` php
16431660public function getHTTPReferer(): string;
16441661```
1645- Gets web page that refers active request. ie: https ://www.google.com
1662+ Gets web page that refers active request. ie: http ://www.google.com
16461663
16471664
16481665``` php
@@ -1756,13 +1773,13 @@ $userEmail = $request->getPost("user_email", "email");
17561773``` php
17571774public function getPut( string $name = null, mixed $filters = null, mixed $defaultValue = null, bool $notAllowEmpty = bool, bool $noRecursive = bool ): mixed;
17581775```
1759- Gets a variable from put request
1776+ Gets a variable from the PUT request
17601777
17611778``` php
1762- // Returns value from $_PUT["user_email"] without sanitizing
1779+ // Returns value from PUT stream without sanitizing
17631780$userEmail = $request->getPut("user_email");
17641781
1765- // Returns value from $_PUT["user_email"] with sanitizing
1782+ // Returns value from PUT stream with sanitizing
17661783$userEmail = $request->getPut("user_email", "email");
17671784```
17681785
@@ -2531,7 +2548,7 @@ Cookies aren't sent if headers are sent in the current request
25312548
25322549
25332550``` php
2534- public function set( string $name, mixed $value = null, int $expire = int, string $path = string, bool $secure = null , string $domain = null , bool $httpOnly = null , array $options = [] ): CookiesInterface;
2551+ public function set( string $name, mixed $value = null, int $expire = int, string $path = string, bool $secure = bool , string $domain = string , bool $httpOnly = bool , array $options = [] ): CookiesInterface;
25352552```
25362553Sets a cookie to be sent at the end of the request.
25372554
@@ -2637,7 +2654,7 @@ Sends the cookies to the client
26372654
26382655
26392656``` php
2640- public function set( string $name, mixed $value = null, int $expire = int, string $path = string, bool $secure = null , string $domain = null , bool $httpOnly = null , array $options = [] ): CookiesInterface;
2657+ public function set( string $name, mixed $value = null, int $expire = int, string $path = string, bool $secure = bool , string $domain = string , bool $httpOnly = bool , array $options = [] ): CookiesInterface;
26412658```
26422659Sets a cookie to be sent at the end of the request
26432660
0 commit comments