|
|
@@ -1,7 +1,20 @@
|
|
|
<?php
|
|
|
// 线上
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
- $config = [];
|
|
|
+ //$config = [];
|
|
|
+ $config = [
|
|
|
+ 'bootstrap' => ['debug', 'gii'],
|
|
|
+ 'modules' => [
|
|
|
+ 'debug' => [
|
|
|
+ 'class' => 'yii\debug\Module',
|
|
|
+ 'allowedIPs' => [getenv('DEBUG_ALLOWED_IP','127.0.0.1')],
|
|
|
+ ],
|
|
|
+ 'gii' => [
|
|
|
+ 'class' => 'yii\gii\Module',
|
|
|
+ 'allowedIPs' => [getenv('GII_ALLOWED_IP','127.0.0.1')],
|
|
|
+ ],
|
|
|
+ ],
|
|
|
+ ];
|
|
|
} else { // 非线上
|
|
|
$config = [
|
|
|
'bootstrap' => ['debug', 'gii'],
|
|
|
@@ -17,4 +30,4 @@ if (getenv('YII_ENV') == 'production') {
|
|
|
],
|
|
|
];
|
|
|
}
|
|
|
-return $config;
|
|
|
+return $config;
|