mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Merge pull request #1724 from phackt/master
fix SNI for transparent mode - #1638
This commit is contained in:
commit
564e56c262
@ -17,6 +17,11 @@ def request(flow):
|
|||||||
flow.request.scheme = 'https'
|
flow.request.scheme = 'https'
|
||||||
flow.request.port = 443
|
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
|
||||||
|
|
||||||
|
|
||||||
def response(flow):
|
def response(flow):
|
||||||
flow.response.headers.pop('Strict-Transport-Security', None)
|
flow.response.headers.pop('Strict-Transport-Security', None)
|
||||||
|
Loading…
Reference in New Issue
Block a user