mitmproxy/examples/simple/add_header_class.py
2017-04-29 03:26:14 +05:30

10 lines
175 B
Python

from mitmproxy import http
class AddHeader:
def response(self, flow: http.HTTPFlow) -> None:
flow.response.headers["newheader"] = "foo"
addons = [AddHeader()]