Pular para o conteúdo
Português (BR)

IpAllowlistOptions

Este conteúdo não está disponível em sua língua ainda.

IpAllowlistOptions = object

Defined in: src/http/middleware/IpAllowlist.ts:36

readonly allow: ReadonlyArray<string>

Defined in: src/http/middleware/IpAllowlist.ts:41

One or more CIDR strings. At least one must match the resolved client IP or the request gets a 403.


readonly optional getClientIp?: (request) => string | null | undefined

Defined in: src/http/middleware/IpAllowlist.ts:51

Override the IP-extraction step. Default: request.remoteAddress. Common override for deployments behind a trusted proxy:

getClientIp: (request) => request.headers['x-forwarded-for']?.split(',')[0]?.trim()

Returning null / undefined makes the request fail closed (403) — no IP means no decision means deny.

HttpRequest

string | null | undefined