Yii2 gii permission with IP


In Your backend/config/main-local.php change below line

$config['modules']['gii'] = 'yii\gii\Module';

With below code

$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
"allowedIPs" => ['127.0.0.2', '::1', '192.168.0.*', '192.168.178.20']
];

This is global change
Go To : vendor/yiisoft/yii2-gii/Module.php to include the remote IP as

public $allowedIPs = ['127.0.0.1', '::1', '192.168.1.*'];

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s