3

There are two headers to handle request forwarding. First is X-Forwarded-For and second is Forwarded.

Which one should I use? X-Forwarded-For is a de-facto whereas Forwarded is an RFC-7239 standard.

There are no specific guidelines in the specification and I could not observe any general trend about this in the web development scope.

1
  • curious, which one did you use, in the end? was my answer of some use?
    – benzkji
    Sep 6, 2019 at 8:24

1 Answer 1

2

It seems nobody is interested in Forwarded, still not in 2019. I would use it, but it's hard, as many tools and frameworks lack support...for example, today, the Django Framework (issue and discussion here) is still using X-Forwarded-XY headers, to detect original IP/Host, etc. And there is no hurry ;-)

In the long term, Forwarded will probably be adopted and the new standard, so, if you can, go with it. I would.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.