mitmproxy/examples/addons/addheader.py

14 lines
212 B
Python
Raw Normal View History

class AddHeader:
def __init__(self):
self.num = 0
def response(self, flow):
self.num = self.num + 1
flow.response.headers["count"] = str(self.num)
addons = [
AddHeader()
]