Skip to content

basalt / fastify/src / IdempotencyPluginOptions

Interface: IdempotencyPluginOptions ​

Defined in: fastify/src/idempotency.ts:145

Properties ​

allowAnonymous? ​

> optional allowAnonymous?: boolean

Defined in: fastify/src/idempotency.ts:164

Also cache and replay requests that carry none of the credential headers. Default false: anonymous callers share no identity to scope a replay by, so any stranger knowing the key would receive the cached response.


credentialHeaders? ​

> optional credentialHeaders?: string[]

Defined in: fastify/src/idempotency.ts:158

Request headers carrying caller credentials; every one present is folded into the replay scope. Default: authorization, x-session-id, cookie, x-api-key. Add your custom auth/API-key header here if you use one.


> optional header?: string

Defined in: fastify/src/idempotency.ts:148

Request header carrying the key. Default 'idempotency-key'.


methods? ​

> optional methods?: string[]

Defined in: fastify/src/idempotency.ts:150

Methods to guard. Default ['POST'].


store? ​

> optional store?: IdempotencyStore

Defined in: fastify/src/idempotency.ts:146


ttlMs? ​

> optional ttlMs?: number

Defined in: fastify/src/idempotency.ts:152

Retention window in ms. Default 24h.

Released under the MIT License.