I want to intercept the request from the client and send back a response without the upstream server ever being contacted. Everything works except the upstream server is always contacted with the original request.
I’ve created an add-on that has a request() method which:
- Creates a http.HTTPResponse object
- Assigns it to flow.response
Mitmproxy is being run with upstream_cert=false.
How do I prevent Mitmproxy from ever fulfilling the original request?
Thanks for your help!