Cloudflare - v1.3.0
    Preparing search index...

    Interface RateLimitSettings

    Rate limiter settings.

    The rate and the window are not here, and cannot be: Cloudflare's rate limiting binding takes its limit and period from wrangler.json at deploy time, not from anything the Worker passes at runtime. Only the binding name is a code-side decision, which is all this settles.

    Bayu Dwiyan Satria

    1.0.0

    1.0.0

    interface RateLimitSettings {
        binding: string;
        failOpen?: boolean;
    }

    Hierarchy (View Summary)

    Index
    binding: string

    Name of the binding as declared in wrangler.json.

    failOpen?: boolean

    Whether an unbound limiter admits the request or refuses it.

    true — the default — makes rate limiting optional infrastructure: a Worker deployed without the binding runs unthrottled rather than rejecting everything. That is right for the common case, where the limiter protects an upstream against load and its absence is a capacity problem rather than a security one.

    Set this to false when the limiter is the only thing standing between an unauthenticated endpoint and someone else's bill. Then a missing binding is an outage, which is visible, instead of a silently open door, which is not.