2015-09-05 23:37:15 +00:00
|
|
|
.. _setheaders:
|
|
|
|
|
|
|
|
Set Headers
|
|
|
|
===========
|
|
|
|
|
|
|
|
This feature lets you specify a set of headers to be added to requests or
|
|
|
|
responses, based on a filter pattern. You can specify these either on the
|
|
|
|
command-line, or through an interactive editor in mitmproxy.
|
|
|
|
|
2015-09-06 01:20:58 +00:00
|
|
|
Example: Set the **Host** header to "example.com" for all requests.
|
|
|
|
|
2015-09-05 23:37:15 +00:00
|
|
|
.. code-block:: none
|
|
|
|
|
|
|
|
mitmdump -R http://example.com --setheader :~q:Host:example.com
|
|
|
|
|
2016-06-07 02:08:46 +00:00
|
|
|
================== =======================
|
|
|
|
command-line ``--setheader PATTERN``
|
2015-09-05 23:37:15 +00:00
|
|
|
mitmproxy shortcut :kbd:`o` then :kbd:`H`
|
2016-06-07 02:08:46 +00:00
|
|
|
================== =======================
|