正确做法:
Add this in the head section of your layout:
<?= Html::csrfMetaTags() ?>
不推荐的做法,以下做法是取消CSRF令牌验证:
Add this in your controller:
public $enableCsrfValidation = false;
时间: 2024-09-30 11:31:45
正确做法:
Add this in the head section of your layout:
<?= Html::csrfMetaTags() ?>
不推荐的做法,以下做法是取消CSRF令牌验证:
Add this in your controller:
public $enableCsrfValidation = false;