Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Multiple simultaneate ratelimits of different periods per route #109

Open
drzraf opened this issue Apr 6, 2020 · 0 comments
Open

Comments

@drzraf
Copy link

drzraf commented Apr 6, 2020

Are multiple periods supported?

   /**
     * Up to 15 per 5 minutes 
     * @RateLimit(methods={"PUT", "POST"}, limit=15, period=300)
     * But, still, no more than 100 per hour (instead of 180 otherwise)
     * @RateLimit(methods={"PUT", "POST"}, limit=100, period=3600)
     */
    public function fooPost() {}

If yes, then this would be valuable to add to the documentation.

Another side question which the documentation does not make clear is whether built-in Route annotation's method is considered.

Eg, with :

   /**
     * @Route(
     *     name="foo",
     *     path="/api/foo",
     *     methods={"POST"}
     * )
     * @RateLimit(limit=10, period=3600)
     */

... is the rate-limit automatically restricted to POST?

Mention #4

@drzraf drzraf changed the title [question] Multiple periods [question] Multiple simultaneate ratelimits per route Apr 6, 2020
@drzraf drzraf changed the title [question] Multiple simultaneate ratelimits per route [question] Multiple simultaneate ratelimits of different periods per route Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant