Μετάβαση στο περιεχόμενο

buildRateLimitKey

Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.

buildRateLimitKey(context, options?): string

Defined in: packages/pipeline-rate-limit/src/helpers/build-key.ts:26

Resolve the rate-limit bucket key for a request.

A keyFactory is required; a request-name-only bucket is shared by every caller in every tenant.

Callers that genuinely want an application-wide operation bucket say so:

{ keyFactory: (ctx) => ctx.requestName }

options.keyPrefix is prepended as "<prefix>:<key>" when provided, so environment and service prefixes stay orthogonal to the partitioning choice.

IPipelineContext

The pipeline context of the current request.

RateLimitBehaviorOptions = {}

Effective behavior options.

string

When no keyFactory is configured.