Skip to content

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

@drzraf

Description

@drzraf

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions