mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-25 18:03:50 +00:00
web: Fix #1888
This commit is contained in:
parent
99b584ad7d
commit
40943f5618
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user