$ curl -H "Host: rado.example.com" http://www.google.com/mysite_rado.html
Problem
How to set and change the default Host header when Chrome sent request.
Solution and demonstration
We can use the 'Change HTTP Request Header' extension. It allows us to tamper the default browser headers. The best part is that it works well with HTTP as well as HTTPS base requests.
This is how the extension looks like.
This is how we have to configure it to change the Host header to different value like 'rado.example.com'.
And this is how an original and modified request looks like on Developer tools.
References
You can also use Requestly - Chrome Extension to modify request and response headers. Requestly has a simple and beautiful UI to modify network requests. Checkout this:
ReplyDelete1. http://stackoverflow.com/questions/3274144/can-i-modify-outgoing-request-headers-with-a-chrome-extension
2. https://chrome.google.com/webstore/detail/requestly/mdnleldcmiljblolnjhpnblkcekpdkpa?hl=en
Disclaimer: I am Requestly Developer.