mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 10:18:26 +00:00
13 lines
250 B
Python
13 lines
250 B
Python
"""Add an HTTP header to each response."""
|
|
|
|
|
|
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()]
|