Commit 85a8191f by Dilip

Changed csrf-var to csrf-param

Changed csrf-var to csrf-param due to meta validation error. The validation error as mentioned in the issue https://github.com/yiisoft/yii2/issues/2363. It is fixed in this pull request.
parent 89fe3549
...@@ -454,7 +454,7 @@ class View extends \yii\base\View ...@@ -454,7 +454,7 @@ class View extends \yii\base\View
$request = Yii::$app->getRequest(); $request = Yii::$app->getRequest();
if ($request instanceof \yii\web\Request && $request->enableCsrfValidation && !$request->getIsAjax()) { if ($request instanceof \yii\web\Request && $request->enableCsrfValidation && !$request->getIsAjax()) {
$lines[] = Html::tag('meta', '', ['name' => 'csrf-var', 'content' => $request->csrfVar]); $lines[] = Html::tag('meta', '', ['name' => 'csrf-param', 'content' => $request->csrfVar]);
$lines[] = Html::tag('meta', '', ['name' => 'csrf-token', 'content' => $request->getCsrfToken()]); $lines[] = Html::tag('meta', '', ['name' => 'csrf-token', 'content' => $request->getCsrfToken()]);
} }
......
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