5.2. Forwarded For
The "for" parameter is used to disclose information about the client
that initiated the request and following proxies in a chain of
proxies. When proxies choose to use the "for" parameter, its default
configuration SHOULD contain an obfuscated identifier as described in
Section 6.3. If the server receiving proxied requests requires some
address-based functionality, this parameter MAY instead contain an
IP-address (and, potentially, a port number). A third option is the
"unknown" identifier described in Section 6.2.
The syntax of a "for" value, after potential quoted-string
unescaping, conforms to the "node" ABNF described in Section 6.
In a chain of proxy servers where this is fully utilized, the first
for-parameter will disclose the client where the request was first
made, followed by any subsequent proxy identifiers. The last proxy
in the chain is not part of the list of for-parameters. The last
proxy's IP address, and optionally a port number, are, however,
readily available as the remote IP address at the transport layer.
It can, however, be more relevant to read information about the last
proxy from preceding "Forwarded" header field's by-parameter, if
present.