Skip to content

Commit

Permalink
fix phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
olegbaturin committed Nov 25, 2024
1 parent 9a3797b commit e6e8311
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions framework/web/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ class Request extends \yii\base\Request
*/
public $enableCsrfValidation = true;
/**
* @var string the name of the HTTP header for sending CSRF token. Defaults [[CSRF_HEADER]].
* This property can be changed for Yii API applications only.
* @var string the name of the HTTP header for sending CSRF token. Defaults to [[CSRF_HEADER]].
* This property may be changed for Yii API applications only.
* Don't change this property for Yii Web application.
*/
public $csrfHeader = self::CSRF_HEADER;
/**
* @var array the name of the HTTP header for sending CSRF token.
* by default validate CSRF token on non-"safe" methods only
* This property is used only when [[enableCsrfValidation]] is true.
* @see https://tools.ietf.org/html/rfc2616#section-9.1.1
* @see https://datatracker.ietf.org/doc/html/rfc9110#name-safe-methods
*/
public $csrfTokenSafeMethods = ['GET', 'HEAD', 'OPTIONS'];
/**
Expand All @@ -144,6 +144,7 @@ class Request extends \yii\base\Request
/**
* @var bool whether to use custom header only to CSRF validation of SPA. Defaults to false.
* If false and [[enableCsrfValidation]] is true, CSRF validation by token will used.
* Warning! CSRF validation by custom header can be used for Yii API applications only.
* @see https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#employing-custom-request-headers-for-ajaxapi
*/
public $validateCsrfHeaderOnly = false;
Expand Down

0 comments on commit e6e8311

Please sign in to comment.