IpAllowlistOptions
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Defined in: src/http/middleware/IpAllowlist.ts:30
Properties
Section titled “Properties”
readonlyallow: readonlystring[]
Defined in: src/http/middleware/IpAllowlist.ts:35
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?: (req) =>string|null|undefined
Defined in: src/http/middleware/IpAllowlist.ts:45
Override the IP-extraction step. Default: req.remoteAddress.
Common override for deployments behind a trusted proxy:
getClientIp: (req) => req.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”Returns
Section titled “Returns”string | null | undefined