The HTTP Via header is included to provide information about how a message has been routed through the network.
The HTTP Via header is added by proxy servers and can be present in both HTTP requests and responses. It is used to maintain a list of message forwards, which can help to avoid re-visiting the same node and creating a network loop. Because the HTTP Via header can store protocol information, it can also be used to track the capabilities and support for different protocols inside the network.
The directives for the HTTP Via header are
host directive refers to the public proxy URL, which may be accompanied by a
alias refers to the name of an internal proxy.
In this example, there are two proxies. The first is
proxy.example.ai and it uses HTTP/1.1. The second is called
edge_1 and also uses version
1.1 of the protocol.
Via: HTTP/1.1 proxy.example.ai, 1.1 edge_1
The HTTP Via header is used to maintain a list of proxy servers that the message passes through. The intermediaries are responsible for adding and modifying the HTTP header.