From 5c2064bd949221e4e7fe3ea02edae5025c2c95dd Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 29 Dec 2013 21:31:27 +0400 Subject: [PATCH] csrf docs added --- docs/guide/controller.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/guide/controller.md b/docs/guide/controller.md index de6cec5..518b236 100644 --- a/docs/guide/controller.md +++ b/docs/guide/controller.md @@ -39,6 +39,26 @@ The output of an action is what the method returns. The return value will be han component which can convert the output to differnet formats such as JSON for example. The default behavior is to output the value unchanged though. +You also can disable CSRF validation per controller, by setting its property: + +```php +namespace app\controllers; + +use yii\web\Controller; + +class SiteController extends Controller +{ + + public $enableCsrfValidation = false; + + public function actionIndex() + { + #CSRF validation will no be applied on this and other actions + } + +} +``` + Routes ------