D
D
ddddd tttt2018-02-19 07:50:24
Yii
ddddd tttt, 2018-02-19 07:50:24

How to make sure that Rate limit is not executed during registration?

The Customer class (ActivityRecord) is running request restrictions, but there is no user yet. An error is thrown.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2018-02-19
@pashaa

As a rule, the number of requests is limited not in ActiveRecord, but in the controller. You can also disable the limit check accordingly in the controller, for example like this:

public function behaviors()
{
    $behaviors = parent::behaviors();
    $behaviors['rateLimiter']['enableRateLimitHeaders'] = false;
    return $behaviors;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question