From 449cbe2d9bb8d9c430b03df885d397a732e3a92c Mon Sep 17 00:00:00 2001 From: Denis Sakharov Date: Sun, 8 Nov 2020 19:28:10 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=80=D0=B0=D0=B7=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=20=D1=85=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D0=B5=D1=81=D1=81?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=B8=20=D1=83=D0=B1=D1=80=D0=B0=D0=BD=20=D1=88?= =?UTF-8?q?=D0=B0=D1=80=D0=B8=D0=BD=D0=B3=20=D1=81=D0=B5=D1=81=D1=81=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=BC=D0=B5=D0=B6=D0=B4=D1=83=20=D1=81=D0=BE=D1=81?= =?UTF-8?q?=D0=B5=D0=B4=D0=BD=D0=B8=D0=BC=D0=B8=20=D1=81=D0=B0=D0=B9=D1=82?= =?UTF-8?q?=D0=B0=D0=BC=D0=B8=20=D0=BD=D0=B0=20=D0=BE=D0=B4=D0=BD=D0=BE?= =?UTF-8?q?=D0=BC=20=D0=B4=D0=B2=D0=B8=D0=B6=D0=BA=D0=B5,=20=D0=BD=D0=BE?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B2=D0=BA=D0=BB=D1=8E=D1=87=D0=B0=D1=82=D1=8C=20?= =?UTF-8?q?=D1=88=D0=B0=D1=80=D0=B8=D0=BD=D0=B3=20=D0=BE=D1=82=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D0=BE=20=D0=B8=D0=B7=20.settings.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=43&LESSON_ID=14024&LESSON_PATH=3913.3435.4816.14028.14024 --- .settings_extra.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.settings_extra.php b/.settings_extra.php index e74fe3a..f3d6231 100644 --- a/.settings_extra.php +++ b/.settings_extra.php @@ -11,14 +11,22 @@ $settings = [ ], 'readonly' => false, ], + 'crypto' => [ + 'value' => [ + 'crypto_key' => md5($_SERVER['DOCUMENT_ROOT']), + ], + ], 'session' => [ 'value' => [ + 'lifetime' => 14400, + 'mode' => 'separated', 'handlers' => [ + 'kernel' => 'encrypted_cookies', 'general' => [ 'type' => 'memcache', 'host' => '127.0.0.1', 'port' => '11211', - 'keyPrefix' => realpath($_SERVER['DOCUMENT_ROOT'] . '/../') . '#02', + 'keyPrefix' => $_SERVER['DOCUMENT_ROOT'] . '#02', ], ], ], @@ -46,6 +54,16 @@ $settings = [ ], ]; +$mainSettings = include(".settings.php"); + +if (isset($mainSettings['crypto'])) { + $settings['crypto'] = $mainSettings['crypto']; +} + +if (isset($mainSettings['session'])) { + $settings['session'] = $mainSettings['session']; +} + if (getenv('RUN_MODE', true) === 'staging') { $settings = array_merge($settings, [ 'analytics_counter' => [ @@ -76,7 +94,7 @@ if (getenv('RUN_MODE', true) === 'development') { 'type' => 'memcache', 'host' => 'memcached', 'port' => '11211', - 'keyPrefix' => realpath($_SERVER['DOCUMENT_ROOT'] . '/../') . '#02', + 'keyPrefix' => $_SERVER['DOCUMENT_ROOT'] . '#02', ], ], ], -- GitLab