diff options
author | Sachin Kelkar <sachinkel19@gmail.com> | 2017-03-01 16:52:45 +0530 |
---|---|---|
committer | Sachin Kelkar <sachinkel19@gmail.com> | 2017-03-03 16:14:20 +0530 |
commit | 40943f5618d0cc9e5ce100df4620aae9cdc236ac (patch) | |
tree | 5bb6a750afe35b9c8fc9035dfa0f8db81eb72b78 | |
parent | 99b584ad7d51470421a176c1b54766fc4dcd5b08 (diff) | |
download | mitmproxy-40943f5618d0cc9e5ce100df4620aae9cdc236ac.tar.gz mitmproxy-40943f5618d0cc9e5ce100df4620aae9cdc236ac.tar.bz2 mitmproxy-40943f5618d0cc9e5ce100df4620aae9cdc236ac.zip |
web: Fix #1888
-rw-r--r-- | mitmproxy/tools/web/app.py | 1 | ||||
-rw-r--r-- | web/src/js/flow/utils.js | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py index 893c3dde..35b549ee 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 cd174069..3c38058e 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; } }); |