Logos DX
    Preparing search index...

    Interface RateLimitRule<S, H, P>

    Rule for matching specific routes in rate limit configuration.

    interface RateLimitRule<S = unknown, H = unknown, P = unknown> {
        enabled?: boolean;
        endsWith?: string;
        includes?: string;
        is?: string;
        match?: RegExp;
        maxCalls?: number;
        methods?: _InternalHttpMethods[];
        serializer?: RequestSerializer<S, H, P>;
        startsWith?: string;
        waitForToken?: boolean;
        windowMs?: number;
    }

    Type Parameters

    • S = unknown
    • H = unknown
    • P = unknown

    Hierarchy (View Summary)

    Index

    Properties

    enabled?: boolean

    Enable/disable rate limiting for matching routes

    endsWith?: string

    Path must end with this suffix

    includes?: string

    Path must contain this substring

    is?: string

    Exact path match

    match?: RegExp

    Path must match this regular expression

    maxCalls?: number

    Maximum calls allowed within the time window

    HTTP methods this rule applies to

    serializer?: RequestSerializer<S, H, P>

    Override serializer for this rule's bucket key generation

    startsWith?: string

    Path must start with this prefix

    waitForToken?: boolean

    Behavior when rate limit is exceeded.

    • true: Wait for token to become available (default)
    • false: Reject immediately with RateLimitError
    windowMs?: number

    Time window in milliseconds