0

Where can I find a definition for the X-Forwarded-For HTTP header? Most sites refer to the Wikipedia site. Here the X-Forwarded-For format is described as X-Forwarded-For: client, proxy1, proxy2. I'm curious what valid strings for one entry can be. Are following examples valid entries?

  • 192.0.2.60
  • 192.0.2.60:58074
  • 2001:db8:cafe::17
  • [2001:db8:cafe::17]:47011
  • "[2001:db8:cafe::17]:47011"
Christian Ammer
  • 7,464
  • 6
  • 51
  • 108

2 Answers2

1

There is none as it is a non-standard header that cannot be found through the message header registry. So your examples are all valid if you decide them to be valid.

If you want to go by a standard, RFC 7239 is providing a standardized mechanism in place of X-Forwarded-For and X-Forwarded-Proto.

Community
  • 1
  • 1
DaSourcerer
  • 6,288
  • 5
  • 32
  • 55
0

This has already been discussed here: What is a full specification of X-Forwarded-Proto HTTP header

You can also have a look at section 7.4 of rfc7239.

Community
  • 1
  • 1
RZet
  • 914
  • 9
  • 11