From 5cb37861c59921b6a4f595c23ad39d5dfe333ced Mon Sep 17 00:00:00 2001 From: Roland Schneider Date: Wed, 4 Nov 2015 18:56:44 +0100 Subject: [PATCH] add different session for backend and frontend --- backend/config/main.php | 8 ++++++++ frontend/config/main.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/backend/config/main.php b/backend/config/main.php index a0b5fc9..c2da5b4 100644 --- a/backend/config/main.php +++ b/backend/config/main.php @@ -16,7 +16,15 @@ return [ 'user' => [ 'identityClass' => 'common\models\User', 'enableAutoLogin' => true, + 'identityCookie' => [ + 'name' => '_backendUser', // unique for backend + 'path'=>'/backend/web' // correct path for the backend app. + ] ], + 'session' => [ + 'name' => '_backendSessionId', // unique for backend + 'savePath' => __DIR__ . '/../runtime', // a temporary folder on backend + ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ diff --git a/frontend/config/main.php b/frontend/config/main.php index 1ed8305..066ed97 100644 --- a/frontend/config/main.php +++ b/frontend/config/main.php @@ -15,7 +15,15 @@ return [ 'user' => [ 'identityClass' => 'common\models\User', 'enableAutoLogin' => true, + 'identityCookie' => [ + 'name' => '_frontendUser', // unique for frontend + 'path'=>'/frontend/web' // correct path for the frontend app. + ] ], + 'session' => [ + 'name' => '_frontendSessionId', // unique for frontend + 'savePath' => __DIR__ . '/../runtime', // a temporary folder on frontend + ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [