yii\web\Request::cookieValidationKey is now automatically generated by the installation script for the basic and advanced application templates

This commit is contained in:
Qiang Xue 2014-07-19 14:56:31 -04:00
parent 539a6f0c59
commit fb1d9fa32a
2 changed files with 55 additions and 47 deletions

View File

@ -31,7 +31,8 @@
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\Installer::setPermission"
"yii\\composer\\Installer::setPermission",
"yii\\composer\\Installer::generateCookieValidationKey"
]
},
"config": {
@ -44,6 +45,9 @@
],
"executable": [
"yii"
],
"config": [
"config/web.php"
]
}
}

View File

@ -7,6 +7,10 @@ $config = [
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'components' => [
'request' => [
// a secret key used to validate cookies. You may modify this key with your own one.
'cookieValidationKey' => '',
],
'cache' => [
'class' => 'yii\caching\FileCache',
],