Commit 8a2903de by Alexander Makarov

Added verb filter to advanced app logout

parent 4d5ba13c
...@@ -5,6 +5,7 @@ use Yii; ...@@ -5,6 +5,7 @@ use Yii;
use yii\web\AccessControl; use yii\web\AccessControl;
use yii\web\Controller; use yii\web\Controller;
use common\models\LoginForm; use common\models\LoginForm;
use yii\web\VerbFilter;
/** /**
* Site controller * Site controller
...@@ -31,6 +32,12 @@ class SiteController extends Controller ...@@ -31,6 +32,12 @@ class SiteController extends Controller
], ],
], ],
], ],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'logout' => ['post'],
],
],
]; ];
} }
......
...@@ -10,6 +10,7 @@ use yii\base\InvalidParamException; ...@@ -10,6 +10,7 @@ use yii\base\InvalidParamException;
use yii\web\BadRequestHttpException; use yii\web\BadRequestHttpException;
use yii\web\Controller; use yii\web\Controller;
use Yii; use Yii;
use yii\web\VerbFilter;
/** /**
* Site controller * Site controller
...@@ -38,6 +39,12 @@ class SiteController extends Controller ...@@ -38,6 +39,12 @@ class SiteController extends Controller
], ],
], ],
], ],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'logout' => ['post'],
],
],
]; ];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment