Separate the original host and protocol from the next hop
04A reverse proxy may receive HTTPS for a public host and forward HTTP with a different Host value. Forwarded can report what that proxy received.
proto=https does not mean the edge-to-origin connection is TLS protected. The reported incoming protocol and the current connection need separate checks.
Source for this drawing: RFC 7239 · Read RFC section 5.3 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
host and proto report the incoming request, not protection of every connection.
- host forwards the original Host value as received by the adding proxy, and after unescaping MUST conform to the referenced Host grammar.
- proto reports the incoming protocol type. After unescaping it MUST use registered URI scheme syntax; typical values are http and https.
- by identifies the proxy’s user-agent-facing interface; for identifies the node making the request to that proxy. Neither is automatically a backend address or authenticated user.
This fictional reverse proxy has explicitly enabled the selected fields. The backend Host rewrite and transport choices are examples, not requirements to use HTTP internally. The field cannot add TLS to an unprotected hop. Incoming metadata is usable only under an appropriate local trust policy.
Read the RFC section ↗