|
|
|
@ -208,7 +208,7 @@ class Request extends \yii\base\Request
|
|
|
|
|
* See [[IpValidator::::setRanges()|IpValidator::setRanges()]] |
|
|
|
|
* and [[IpValidator::networks]] for advanced matching. |
|
|
|
|
* |
|
|
|
|
* @see $secureHeaders |
|
|
|
|
* @see secureHeaders |
|
|
|
|
* @since 2.0.13 |
|
|
|
|
*/ |
|
|
|
|
public $trustedHosts = []; |
|
|
|
@ -219,7 +219,7 @@ class Request extends \yii\base\Request
|
|
|
|
|
* The match of header names is case-insensitive. |
|
|
|
|
* @see https://en.wikipedia.org/wiki/List_of_HTTP_header_fields |
|
|
|
|
* @see https://datatracker.ietf.org/doc/html/rfc7239 |
|
|
|
|
* @see $trustedHosts |
|
|
|
|
* @see trustedHosts |
|
|
|
|
* @since 2.0.13 |
|
|
|
|
*/ |
|
|
|
|
public $secureHeaders = [ |
|
|
|
@ -240,8 +240,8 @@ class Request extends \yii\base\Request
|
|
|
|
|
* It's not advisable to put insecure headers here. |
|
|
|
|
* To use the `Forwarded` header according to RFC 7239, the header must be added to [[secureHeaders]] list. |
|
|
|
|
* The match of header names is case-insensitive. |
|
|
|
|
* @see $trustedHosts |
|
|
|
|
* @see $secureHeaders |
|
|
|
|
* @see trustedHosts |
|
|
|
|
* @see secureHeaders |
|
|
|
|
* @since 2.0.13 |
|
|
|
|
*/ |
|
|
|
|
public $ipHeaders = [ |
|
|
|
@ -252,8 +252,8 @@ class Request extends \yii\base\Request
|
|
|
|
|
* The array keys are header names and the array value is a list of header values that indicate a secure connection. |
|
|
|
|
* The match of header names and values is case-insensitive. |
|
|
|
|
* It's not advisable to put insecure headers here. |
|
|
|
|
* @see $trustedHosts |
|
|
|
|
* @see $secureHeaders |
|
|
|
|
* @see trustedHosts |
|
|
|
|
* @see secureHeaders |
|
|
|
|
* @since 2.0.13 |
|
|
|
|
*/ |
|
|
|
|
public $secureProtocolHeaders = [ |
|
|
|
@ -1171,7 +1171,7 @@ class Request extends \yii\base\Request
|
|
|
|
|
/** |
|
|
|
|
* Returns the user IP address from [[ipHeaders]]. |
|
|
|
|
* @return string|null user IP address, null if not available |
|
|
|
|
* @see $ipHeaders |
|
|
|
|
* @see ipHeaders |
|
|
|
|
* @since 2.0.28 |
|
|
|
|
*/ |
|
|
|
|
protected function getUserIpFromIpHeaders() |
|
|
|
@ -1216,9 +1216,9 @@ class Request extends \yii\base\Request
|
|
|
|
|
* |
|
|
|
|
* @param string $ips comma separated IP list |
|
|
|
|
* @return string|null IP as string. Null is returned if IP can not be determined from header. |
|
|
|
|
* @see $getUserHost |
|
|
|
|
* @see $ipHeader |
|
|
|
|
* @see $trustedHeaders |
|
|
|
|
* @see getUserHost |
|
|
|
|
* @see ipHeader |
|
|
|
|
* @see trustedHeaders |
|
|
|
|
* @since 2.0.28 |
|
|
|
|
*/ |
|
|
|
|
protected function getUserIpFromIpHeader($ips) |
|
|
|
|