正确做法:
Add this in the head section of your layout:
<?= Html::csrfMetaTags() ?>
不推荐的做法,以下做法是取消CSRF令牌验证:
Add this in your controller:
public $enableCsrfValidation = false;
正确做法:
Add this in the head section of your layout:
<?= Html::csrfMetaTags() ?>
不推荐的做法,以下做法是取消CSRF令牌验证:
Add this in your controller:
public $enableCsrfValidation = false;
转载于:https://my.oschina.net/u/873762/blog/493350