docker 容器内yii2使用gii工具 403错误解决方案
2019-01-15 本文已影响0人
小轩_e111
docker 容器内yii2使用gii工具
Forbidden (#403)
You are not allowed to access this page.
需要再配置文件中配置一下信息方可解决
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'allowedIPs' => ['127.0.0.1','::1','172.17.0.*'],
'generators' => [
'crud' => [
'class' => yii\gii\generators\crud\Generator::className(),
'templates' => [
'default' => '@vendor/yiisoft/yii2-gii/src/generators/crud/default',
'rageframe' => '@backend/components/gii/crud/default',
]
]
],
];