← Addonium

clients.ts

Install with bun add @addonium/helpers. Zero runtime dependencies - works under Bun, Node 18+, and browsers.

clients.ts

allowlistEnforced(m: Pick<Manifest, "clients">): boolean

function allowlistEnforced.

isClientAllowed( manifest: Pick<Manifest, "clients">, clientId?: string, ): boolean

Server-side check: is this clientId permitted? Defaults to allow when off.

clientIdentity( manifest: Pick<Manifest, "clients">, clientId: string, ): { headers?: Record<string, string>; query?: Record<string, string> }

Client-side: header/query fragment identifying this host build.

denyResponse(manifest: Pick<Manifest, "clients">):

function denyResponse.