File: setheaders.rst

package info (click to toggle)
mitmproxy 0.18.2-6%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 37,444 kB
  • sloc: python: 33,213; makefile: 167; ansic: 68; sh: 48
file content (19 lines) | stat: -rw-r--r-- 583 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.. _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.

Example: Set the **Host** header to "example.com" for all requests.

.. code-block:: none

    mitmdump -R http://example.com --setheader :~q:Host:example.com

================== =======================
command-line       ``--setheader PATTERN``
mitmproxy shortcut :kbd:`o` then :kbd:`H`
================== =======================