Search This Blog

Showing posts with label Host header. Show all posts
Showing posts with label Host header. Show all posts

Thursday, January 31, 2013

How to modify HTTP Host header in Chrome

HTTP protocol troubleshooting requires sending of GET requests with a preset headers like 'Host' one. You can always do it using curl but you may want to see the result directly in your browser.
$ 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
  1. https://chrome.google.com/webstore/detail/change-http-request-heade/ppmibgfeefcglejjlpeihfdimbkfbbnm