Skip to content

Commit

Permalink
Fix config again.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Oct 12, 2023
1 parent c0b799e commit b74db6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
];
7 changes: 5 additions & 2 deletions config/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
/**
* @var array $params
*/
$debug = [];

if (isset($params['yii.debug']) && $params['yii.debug'] === true) {
$debug = [
// configuration adjustments for 'dev' environment
'bootstrap' => ['debug'],
'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;

0 comments on commit b74db6b

Please sign in to comment.