frontend->config->main-local.php
$config = [
'defaultRoute' => 'index/index',//修改默认访问控制器
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
/*___*/
'enableCookieValidation' => false,
'enableCsrfValidation' => false,
],
],
];