mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-04 19:57:16 +00:00
explain host=pretty_host assignment
This commit is contained in:
parent
dc44465c92
commit
2a2387fb32
1 changed files with 4 additions and 0 deletions
|
|
@ -16,6 +16,10 @@ def request(flow):
|
|||
if flow.request.pretty_host in secure_hosts:
|
||||
flow.request.scheme = 'https'
|
||||
flow.request.port = 443
|
||||
|
||||
# We need to update the request destination to whatever is specified in the host header:
|
||||
# Having no TLS Server Name Indication from the client and just an IP address as request.host
|
||||
# in transparent mode, TLS server name certificate validation would fail.
|
||||
flow.request.host = flow.request.pretty_host
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue