1 2 3 4 5 6 7 8 9
from mitmproxy import http class AddHeader: def response(self, flow: http.HTTPFlow) -> None: flow.response.headers["newheader"] = "foo" addons = [AddHeader()]