Yii2 Gii Access forbidden

Add the following snippet to yii2 config file and get debug and gii to work for all ips

For basic application ,paste the snippet in config/web.php

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['127.0.0.1', '::1','*'],
    ];

yii2,forbidden