CodeSampleX

Sample

Show how `trust proxy` controls whether Express reads `X-Forwarded-For` for `req.ip` and `req.ips`.

sha256:3a4cd850e24a4583db4efbe2c07c6463fb853a6a7bb75a6d1f365a1b70a6bb0c

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Show how `trust proxy` controls whether Express reads `X-Forwarded-For` for `req.ip` and `req.ips`. HOW
Packages
express 4.19.1
Environment
node
Created
2026-08-17T03:16:22Z

Commonly assumed

Forwarded client IP headers should always be reflected in `req.ip` even when `trust proxy` is disabled.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts