diff --git a/test_addon.py b/test_addon.py new file mode 100644 index 0000000..eba535c --- /dev/null +++ b/test_addon.py @@ -0,0 +1,10 @@ +from mitmproxy.http import HTTPFlow + + +def requestheaders(flow: HTTPFlow) -> None: + host = flow.request.pretty_host + flow.request.host = '127.0.0.1' + flow.request.port = 4001 + flow.request.headers['X-Forwarded-Proto'] = flow.request.scheme + flow.request.scheme = 'http' + flow.request.host_header = host