0

I am a little confused on the this current standard for headers (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded). I tried reading the specification (https://datatracker.ietf.org/doc/html/rfc7239#section-4) and it seems a little confusing to me with limited examples.

I have a basic configuration like this:

client -> ingress (load balancer) -> reverse proxy -> service

The Forwaded header defines four fields as follows:

  1. by - The interface where the request came in to the proxy server.
  2. for - The client that initiated the request and subsequent proxies in a chain of proxies.
  3. host - The Host request header field as received by the proxy.
  4. proto - Indicates which protocol was used to make the request (typically "http" or "https").

Can anyone tell me (excluding proto, that one is obvious) what each of these is set to in my case? I set the headers at my proxy with a registry lookup for services. My assumption was the "for" is the client sending the request, "by" I don't know what interface means, "host" I assumed is my ingress. I want to follow the standard, it just seems slightly vague.

  • 1
    Could you phrase some specific question(s) that you need help to figure out? The spec that you link to goes much more in depth (about a dozen pages) than these one-sentence descriptions included in the question, and with that in mind I feel like there ought to be something more specific than "this all seems vague, can anyone tell me how to do it right?" – Håkan Lindqvist May 22 '21 at 00:58
  • I flagged the question as it is too broad to be exactly one question, please improve – djdomi May 22 '21 at 09:57
  • I am asking with my current setup, what do I set each of those header fields to be. I have a client (web browser), it goes to a load balancer, the load balancer redirected to my reverse proxy, and then depending on the request directed to the proxy, it hits a service. I am asking when I set headers, what are each of those 4 fields according to spec. – Adam Johnston May 23 '21 at 00:02

0 Answers0