blob: 4ebcc3e94fe7d72bbdb73d9faa033521f1754516 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from mitmproxy import ctx
def modify(chunks):
for chunk in chunks:
yield chunk.replace(b"foo", b"bar")
def running():
ctx.log.info("stream_modify running")
def responseheaders(flow):
flow.response.stream = modify
|