<?php
$config = [
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '5-TS9SscpfQXS0aVtRrPUZcRcW053Opc',
],
],
];
if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = 'yiidebugModule';
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yiigiiModule',
'allowedIPs' => [
'127.0.0.1',
'192.168.33.1' //限制ip使用gii
],
];
}
return $config;
yii gii配置ip限制使用gii