HTTP Headers
Via
The Via
request and response header are added by proxies, both forward and reverse.
They are utilized for tracking message forwarding, preventing request loops, and identifying the protocol capabilities of the sender throughout the request and response chain.
Syntax
Via: [<protocol-name>/]<protocol-version> <host>[:<port>]
Via: [<protocol-name>/]<protocol-version> <pseudonym>
Processed and formatted content as requested.
Directives
Directives
<protocol-name>
- The name of the protocol used, such as “HTTP”.
<protocol-version>
- The version of the protocol used, such as “1.1”.
<host>
- Public proxy URL and optional
<port>
.
If a host is not provided, then a<pseudonym>
must be used.
<pseudonym>
- Name or alias of an internal proxy.
If a pseudonym is not provided, then a<host>
must be used.
Example
Via: 1.1 vegur
Via: HTTP/1.1 GWA
Via: 1.0 fred, 1.1 p.example.net
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Via header. This can help you test how intermediaries, like proxies or gateways, affect your requests or debug issues related to request routing. Steps to Modify the Via Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Via.
- In the “Header Value” field, enter the desired value (e.g., 1.1 example-proxy).
- Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/*).
- Save the rule.
Once set up, Requestly will inject the Via header into all matching requests, allowing you to simulate the presence of proxies or intermediaries and better understand how your application handles such scenarios.
Table of Contents
- No headings found.