Expand description
Direct extraction of common single-value client IP fields.
Each function parses exactly one provider or proxy field and returns its raw
asserted IpAddr. CF-Connecting-IP, CloudFront-Viewer-Address,
Fly-Client-IP, True-Client-IP, X-Envoy-External-Address, and
X-Real-IP are vendor or de facto conventions, not IETF standards.
These values are untrusted: this module does not authenticate a proxy or
apply a trust policy. The feature-gated client_ip::extract_client_ip
convenience includes selected fields, but its output remains untrusted.
Applications must decide whether a specific field is trustworthy for their
deployment. Every extractor treats
the field as singular: absence returns None, while duplicate, non-text,
empty, or malformed values return a value-redacting error.
Functions§
- extract_
header_ cf_ connecting_ ip - Extract the raw, untrusted IP asserted by
CF-Connecting-IP. - extract_
header_ cloudfront_ viewer_ address - Extract an untrusted client IP from AWS CloudFront’s
CloudFront-Viewer-AddressIP:portvalue. - extract_
header_ fly_ client_ ip - Extract the raw, untrusted IP asserted by
Fly-Client-IP. - extract_
header_ true_ client_ ip - Extract an untrusted client IP asserted by
True-Client-IP. - extract_
header_ x_ envoy_ external_ address - Extract an untrusted client IP asserted by Envoy’s
X-Envoy-External-Address. - extract_
header_ x_ real_ ip - Extract the raw, untrusted IP asserted by
X-Real-IP. - extract_
request_ cf_ connecting_ ip - Extract
CF-Connecting-IPfrom a complete request. - extract_
request_ cloudfront_ viewer_ address - Extract
CloudFront-Viewer-Addressfrom a complete request. - extract_
request_ fly_ client_ ip - Extract
Fly-Client-IPfrom a complete request. - extract_
request_ true_ client_ ip - Extract
True-Client-IPfrom a complete request. - extract_
request_ x_ envoy_ external_ address - Extract
X-Envoy-External-Addressfrom a complete request. - extract_
request_ x_ real_ ip - Extract
X-Real-IPfrom a complete request.