I would like to redirect a host by using mitmproxy. At the moment the python script looks like this:
import mitmproxy
from mitmproxy.models import HTTPResponse
from netlib.http import Headers
def request(context, flow):
if flow.request.url == 'http://me.example.com':
flow.request.host = 'you.example.com'
Hoever doesn't work as expected. Can you please help with this issue?
Thanks Andrew