mirror of
https://github.com/elyby/accounts.git
synced 2024-12-26 07:09:46 +05:30
8eb6a595c0
В nginx добавлена конфигурация, отвечающая за проксирование сессионных запросов со старого домена Версия nginx обновлена с 1.9 до 1.11 В тестах сессионного сервера больше не используется генерация url
64 lines
1.9 KiB
PHP
64 lines
1.9 KiB
PHP
<?php
|
|
$params = array_merge(
|
|
require(__DIR__ . '/../../common/config/params.php'),
|
|
require(__DIR__ . '/../../common/config/params-local.php'),
|
|
require(__DIR__ . '/params.php'),
|
|
require(__DIR__ . '/params-local.php')
|
|
);
|
|
|
|
return [
|
|
'id' => 'accounts-site-api',
|
|
'basePath' => dirname(__DIR__),
|
|
'bootstrap' => ['log', 'authserver'],
|
|
'controllerNamespace' => 'api\controllers',
|
|
'params' => $params,
|
|
'components' => [
|
|
'user' => [
|
|
'class' => \api\components\User\Component::class,
|
|
'secret' => $params['userSecret'],
|
|
],
|
|
'apiUser' => [
|
|
'class' => \api\components\ApiUser\Component::class,
|
|
],
|
|
'log' => [
|
|
'traceLevel' => YII_DEBUG ? 3 : 0,
|
|
'targets' => [
|
|
[
|
|
'class' => \yii\log\FileTarget::class,
|
|
'levels' => ['error', 'warning'],
|
|
],
|
|
],
|
|
],
|
|
'request' => [
|
|
'baseUrl' => '/api',
|
|
],
|
|
'urlManager' => [
|
|
'enablePrettyUrl' => true,
|
|
'showScriptName' => false,
|
|
'rules' => require __DIR__ . '/routes.php',
|
|
],
|
|
'reCaptcha' => [
|
|
'class' => \api\components\ReCaptcha\Component::class,
|
|
],
|
|
'response' => [
|
|
'format' => \yii\web\Response::FORMAT_JSON,
|
|
],
|
|
'oauth' => [
|
|
'class' => \common\components\oauth\Component::class,
|
|
'grantTypes' => ['authorization_code'],
|
|
],
|
|
'errorHandler' => [
|
|
'class' => \api\components\ErrorHandler::class,
|
|
],
|
|
],
|
|
'modules' => [
|
|
'authserver' => [
|
|
'class' => \api\modules\authserver\Module::class,
|
|
'baseDomain' => $params['authserverDomain'],
|
|
],
|
|
'session' => [
|
|
'class' => \api\modules\session\Module::class,
|
|
],
|
|
],
|
|
];
|