浏览代码

Fixes #3358: Removed automatic CSRF meta tag generation by `View`. Added `Html::csrfMetaTags()` and its call to main layout files

Qiang Xue 11 年之前
父节点
当前提交
01429aba17
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      views/layouts/main.php

+ 1 - 0
views/layouts/main.php

@@ -17,6 +17,7 @@ AppAsset::register($this);
 <head>
     <meta charset="<?= Yii::$app->charset ?>"/>
     <meta name="viewport" content="width=device-width, initial-scale=1">
+    <?= Html::csrfMetaTags() ?>
     <title><?= Html::encode($this->title) ?></title>
     <?php $this->head() ?>
 </head>