Skip to content

Commit

Permalink
Added DEBUG_ALLOWED_IPS env and debug.enabled default
Browse files Browse the repository at this point in the history
Copy `DEBUG_ALLOWED_IPS` env variable to `debug.allowedIps` param
Set proper `debug.enabled` param accoring to YII_ENV!=prod
  • Loading branch information
hiqsol committed Apr 4, 2019
1 parent 6a37533 commit 5d4a6ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

'favicon.ico' => '@hisite/assets/images/favicon.ico',

'debug.enabled' => null,
'debug.allowedIps' => [],
'debug.enabled' => !(defined('YII_ENV') && YII_ENV === 'prod'),
'debug.allowedIps' => explode(',', $_ENV['DEBUG_ALLOWED_IPS'] ?? '127.0.0.1'),
'debug.historySize' => 100,

'mailer.enabled' => YII_ENV === 'prod' ? true : null,
Expand Down

0 comments on commit 5d4a6ba

Please sign in to comment.