Hierarchy

  • RateLimitRule

Methods

  • Validate makes RateLimitRule validatable by implementing [validation.Validatable] interface.

    Returns void

Properties

audience: string

Audience specifies the auth group the rule should apply for:

  - ""      - both guests and authenticated users (default)
- "guest" - only for guests
- "auth" - only for authenticated users
duration: number

Duration specifies the interval (in seconds) per which to reset the counted/accumulated rate limiter tokens.

label: string

Label is the identifier of the current rule.

It could be a tag, complete path or path prerefix (when ends with /).

Example supported labels:

  - test_a (plain text "tag")
- users:create
- *:create
- /
- /api
- POST /api/collections/
maxRequests: number

MaxRequests is the max allowed number of requests per Duration.

Generated using TypeDoc