mitmproxy/examples/simple/add_header_class.py

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()]