Clov Packages
    Preparing search index...
    • Creates the rate limit plugin

      Elysia keeps one definition per plugin name, so every rateLimitPlugin() of an app tree resolves to a single plugin instance — the first one. Pass the store here to change it for the whole app, a later rateLimitPlugin(store) is ignored.

      Parameters

      • store: KvStore = ...

      Returns Elysia<
          "rateLimitPlugin",
          "local",
          { decorator: {}; derive: {}; store: {} },
          {
              error: [];
              typebox: {
                  "rate-limit.quota.exceeded": TObject<
                      {
                          detail: TString;
                          status: TLiteral<429>;
                          title: TString;
                          type: TLiteral<"rate-limit.quota.exceeded">;
                      },
                  >;
              };
          },
          {
              macro: Partial<{ rateLimit: RateLimitMacroOptions }>;
              macroFn: { rateLimit: RateLimitMacro };
              parser: {};
              response: {};
              schema: {};
              schemas: {};
          },
      >