dingo / dingo/api

Rate Limiting does not work

Open
#1,517 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

| Q | A
| ----------------- | ---
| Bug? | no|
| New Feature? | no
| Framework | Laravel
| Framework version | 5.5.32
| Package version | 2.0.0-alpha1
| PHP version |7.x.y

According to [this guidance][1] ,I added a throttle functionality to a specific route in my laravel project like this :

$api->group(['prefix' => 'auth'], function ($api) {
$api->post('checkUser', ['middleware' => 'api.throttle', 'limit' => 3, 'expires' => 20, 'uses' => 'Auth\LoginController@checkUser']);
});

As you can see I added a throttle , limit of **3** with an expiration time of **20** minutes for this specific route.

But even I request that rout more than **3** times, no things occurred.

I do not know what is problem or is need any more step or not?

[1]: https://github.com/dingo/api/wiki/Rate-Limiting

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.