<?php

$config = [
    'components' => [
        'request'    => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => 'hIpmJUIi3T04zZuyvbjISX7tqCcIiL0R',
            'baseUrl'             => '',
            // unique CSRF cookie parameter for frontend (set by kartik-v/yii2-app-practical)
            'csrfParam'           => '_frontendCsrf',
        ],
        // unique identity cookie configuration for frontend (set by kartik-v/yii2-app-practical)
        'user'       => [
            'identityCookie' => [
                'name' => '_frontendUser', // unique for frontend
                'path' => '/' // set it to correct path for frontend app.
            ]
        ],
        // unique session configuration for frontend (set by kartik-v/yii2-app-practical)
        'session'    => [
            'name'     => '_frontendSessionId', // unique for frontend
            'savePath' => __DIR__ . '/../runtime/sessions' // set it to correct path for frontend app.
        ],
        // url manager to access frontend
        'urlManager' => [
            'class'           => 'yii\web\urlManager',
            'baseUrl'         => '/', // change to your app base folder name
            'enablePrettyUrl' => true,
            'showScriptName'  => false,
        ],
    ],
];

if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = 'yii\debug\Module';

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

return $config;
