At times we may need to add custom headers to a request for debugging purpose. e.g. You may want to display debugging messages when specific header is present in request (e.g. debug with value 1). This can be done using Modify header chrome plugin. Here are quick steps:
- Install the Modify header plugin in Chrome browser.
Once installed, look for the plugin icon in Chrome toolbar and click on it. Select Request headers and enter “debug” with value 1 (just using these values for the sake of this tutorial). Select URL pattern and enter the desired domain pattaern (e.g. *://infoheap.com/). You can also enter multiple patterns. In that case headers will be sent to url matching any pattern.
Open Chrome developer tools and load a url which matches with above pattern. You should be able to see custom header in request headers as shown below:
- Load a url which does not match with above pattern. Now our custom header field should not be present in headers.