You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. $params = array_merge(
  3. require __DIR__ . '/../../common/config/params.php', require __DIR__ . '/../../common/config/params-local.php', require __DIR__ . '/params.php', require __DIR__ . '/params-local.php'
  4. );
  5. return [
  6. 'id' => 'backend',
  7. 'basePath' => dirname(__DIR__),
  8. 'controllerNamespace' => 'backend\controllers',
  9. 'bootstrap' => ['log'],
  10. 'modules' => [],
  11. 'components' => [
  12. 'request' => [
  13. 'csrfParam' => '_csrf-backend',
  14. ],
  15. 'user' => [
  16. 'identityClass' => 'common\models\User',
  17. 'enableAutoLogin' => true,
  18. 'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
  19. ],
  20. 'session' => [
  21. // this is the name of the session cookie used for login on the app
  22. 'name' => 'backend',
  23. ],
  24. 'log' => [
  25. 'traceLevel' => YII_DEBUG ? 3 : 0,
  26. 'targets' => [
  27. [
  28. 'class' => 'yii\log\FileTarget',
  29. 'levels' => ['error', 'warning'],
  30. ],
  31. ],
  32. ],
  33. 'errorHandler' => [
  34. 'errorAction' => 'site/error',
  35. ],
  36. 'urlManager' => [
  37. 'enablePrettyUrl' => true,
  38. 'showScriptName' => false,
  39. 'rules' => [
  40. ],
  41. ],
  42. ],
  43. 'params' => $params,
  44. ];