Discard a response that satisfies a specific criteria?

Hi, I am wondering whether it is possible for mitmproxy to selectively discard the http responses from a specific host.
For example, suppose we access web sites A and B through mitmproxy, then for the response from A we redirect them to the client; while the response from site B will be silently discarded by the mitmproxy.

Hi @ppsun,

You could write a mitmproxy script that just calls flow.kill() for the responses you want to discard. Does that help?

Definitely. Thanks for your help!