aboutsummaryrefslogtreecommitdiffstats
path: root/examples/complex
diff options
context:
space:
mode:
Diffstat (limited to 'examples/complex')
-rw-r--r--examples/complex/dns_spoofing.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/complex/dns_spoofing.py b/examples/complex/dns_spoofing.py
index c6d46b66..acda303d 100644
--- a/examples/complex/dns_spoofing.py
+++ b/examples/complex/dns_spoofing.py
@@ -34,7 +34,7 @@ class Rerouter:
The original host header is retrieved early
before flow.request is replaced by mitmproxy new outgoing request
"""
- flow.metadata["original_host"] = flow.request.headers["Host"]
+ flow.metadata["original_host"] = flow.request.host_header
def request(self, flow):
if flow.client_conn.ssl_established:
@@ -53,7 +53,7 @@ class Rerouter:
if m.group("port"):
port = int(m.group("port"))
- flow.request.headers["Host"] = host_header
+ flow.request.host_header = host_header
flow.request.host = sni or host_header
flow.request.port = port