Skip to content

security

Client IP trust and request limits.

Type: auto · x-forwarded-for · x-real-ip · cf-connecting-ip · Default: auto

Where the real client IP comes from.

  • auto: CF-Connecting-IP when the peer is in Cloudflare’s ranges, otherwise the right-most untrusted X-Forwarded-For entry.
  • x-forwarded-for: Right-most untrusted X-Forwarded-For entry.
  • x-real-ip: X-Real-IP from a trusted proxy.
  • cf-connecting-ip: CF-Connecting-IP from a trusted proxy (Cloudflare’s edge or a listed network); needs cloudflare in trusted_proxies.

Type: object · Default: see the fields below

Request size limits.

Type: ByteSize

Request body size, also enforced for chunked bodies. Unlimited when omitted.

Type: ByteSize · Default: 64KiB

Total size of the request line and headers.

Type: integer · Default: 100

Number of request headers.

Type: ByteSize · Default: 8KiB

Request target (path and query) length.

Type: list of TrustedProxy

Proxies whose forwarded headers are believed. Headers from anyone else are replaced.