Beignet API reference
    Preparing search index...

    Function createRateLimitHooks

    • Create metadata-driven rate-limit hooks.

      The hook reads contract.metadata.rateLimit. Global and IP-scoped limits run in onRequest before context creation; user-scoped limits run in beforeHandle after ctx.actor is available. Exceeded limits throw the framework TooManyRequests app error.

      Type Parameters

      Parameters

      Returns ServerHook<Ctx, RateLimitPorts>

      A server hook backed by ctx.ports.rateLimit.