static/jsvm/interfaces/core.RateLimitRule.html
audiencedurationlabelmaxRequests
DurationTime returns the tag's Duration as [time.Duration].
String returns a string representation of the rule.
Validate makes RateLimitRule validatable by implementing [validation.Validatable] interface.
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 usersCopy
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/Copy
maxRequests: number
MaxRequests is the max allowed number of requests per Duration.
OSLightDark
Generated using TypeDoc