S
S
Sergey Beloventsev2016-07-22 07:11:34
Yii
Sergey Beloventsev, 2016-07-22 07:11:34

An incomprehensible error with accesses, how to fix it?

I'm trying to enter debug on the hosting, it gives an error

Forbidden (#403)
You are not allowed to access this page.

the same thing with gii on the local machine is not. And the second, all forms in the backend give out when sent
Bad Request (#400)
 Не удалось проверить переданные данные.

on the local machine this error is. debug shows that csrf is being passed here it is
_csrf   'QXNaWk4wVlMjEjU4Clo/JjIXGx8lAj8YFxFiOH1fPjw4MRQZY1YxFw=='

Help to find an error at least in what direction to search.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2016-07-22
@Sergalas

In main-local, if you do not need to give everyone a debug panel, then instead of an asterisk, your ip, and write permissions at runtime

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question