Back to Pocketbase

Interface RateLimitRule

static/jsvm/interfaces/core.RateLimitRule.html

latest2.0 KB
Original Source

Interface RateLimitRule

Hierarchy

  • RateLimitRule

Index

Methods

durationTimestringvalidate

Properties

audiencedurationlabelmaxRequests

Methods

durationTime

DurationTime returns the tag's Duration as [time.Duration].

Returns Duration

string

  • string(): string

String returns a string representation of the rule.

Returns string

validate

  • validate(): void

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

Returns void

Properties

audience

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

duration: number

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

label

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

maxRequests: number

MaxRequests is the max allowed number of requests per Duration.

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

On This Page

Generated using TypeDoc