diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py index 893c3dde0..35b549ee4 100644 --- a/mitmproxy/tools/web/app.py +++ b/mitmproxy/tools/web/app.py @@ -65,6 +65,7 @@ def flow_to_json(flow: mitmproxy.flow.Flow) -> dict: "timestamp_start": flow.request.timestamp_start, "timestamp_end": flow.request.timestamp_end, "is_replay": flow.request.is_replay, + "pretty_host": flow.request.pretty_host, } if flow.response: if flow.response.raw_content: diff --git a/web/src/js/flow/utils.js b/web/src/js/flow/utils.js index cd174069d..3c38058ee 100644 --- a/web/src/js/flow/utils.js +++ b/web/src/js/flow/utils.js @@ -54,16 +54,12 @@ export var MessageUtils = { }; export var RequestUtils = _.extend(MessageUtils, { - pretty_host: function (request) { - //FIXME: Add hostheader - return request.host; - }, pretty_url: function (request) { var port = ""; if (defaultPorts[request.scheme] !== request.port) { port = ":" + request.port; } - return request.scheme + "://" + this.pretty_host(request) + port + request.path; + return request.scheme + "://" + request.pretty_host + port + request.path; } });