IpAllowlistOptions
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
IpAllowlistOptions =
object
Defined in: src/http/middleware/IpAllowlist.ts:36
Properties
Section titled “Properties”
readonlyallow: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.
getClientIp?
Section titled “getClientIp?”
readonlyoptionalgetClientIp?: (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.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”string | null | undefined
