From b74db6bdca3c3128bcc67ce8e12bff2ed1a7e10a Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 12 Oct 2023 06:59:10 -0300 Subject: [PATCH] Fix config again. --- config/params.php | 5 +++-- config/web.php | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/params.php b/config/params.php index 05aee98..0007b79 100644 --- a/config/params.php +++ b/config/params.php @@ -3,6 +3,7 @@ declare(strict_types=1); return [ - // enable/disable debug mode - 'yii.debug' => false, + // debug + 'yii.debug' => false, // enable debug mode + 'yii.debug.allowedIPs' => ['127.0.0.1', '::1'], // allow debug on localhost only ]; diff --git a/config/web.php b/config/web.php index b8e3418..c7bc1ab 100644 --- a/config/web.php +++ b/config/web.php @@ -5,6 +5,8 @@ /** * @var array $params */ + $debug = []; + if (isset($params['yii.debug']) && $params['yii.debug'] === true) { $debug = [ // configuration adjustments for 'dev' environment @@ -12,9 +14,10 @@ 'modules' => [ 'debug' => [ 'class' => \yii\debug\Module::class, - // uncomment the following to add your IP if you are not connecting from localhost. - // 'allowedIPs' => ['127.0.0.1', '::1'], + 'allowedIPs' => $params['yii.debug.allowedIPs'] ?? [], ], ], ]; } + +return $debug;