main-local.php 653 B

12345678910111213141516171819202122
  1. <?php
  2. // 线上
  3. if (getenv('YII_ENV') == 'production') {
  4. $config = [];
  5. } else { // 非线上
  6. $config = [
  7. 'bootstrap' => ['debug', 'gii'],
  8. 'modules' => [
  9. 'debug' => [
  10. 'class' => 'yii\debug\Module',
  11. 'allowedIPs' => [getenv('DEBUG_ALLOWED_IP','127.0.0.1')],
  12. // Debug 工具栏保留的历史请求条数,默认 50 条过少
  13. 'historySize' => 10000,
  14. ],
  15. 'gii' => [
  16. 'class' => 'yii\gii\Module',
  17. 'allowedIPs' => [getenv('GII_ALLOWED_IP','127.0.0.1')],
  18. ],
  19. ],
  20. ];
  21. }
  22. return $config;