mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-21 22:58:24 +00:00
web: display WS/WSS as method
This commit is contained in:
parent
628d6201ae
commit
a0e04a7833
@ -177,7 +177,7 @@ exports[`should render columns: method 1`] = `
|
||||
<td
|
||||
class="col-method"
|
||||
>
|
||||
GET
|
||||
WSS
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -34,7 +34,7 @@ exports[`FlowRow 1`] = `
|
||||
<td
|
||||
class="col-method"
|
||||
>
|
||||
GET
|
||||
WSS
|
||||
</td>
|
||||
<td
|
||||
class="col-status"
|
||||
|
@ -107,8 +107,18 @@ path.headerName = 'Path'
|
||||
path.sortKey = flow => mainPath(flow)
|
||||
|
||||
export const method: FlowColumn = ({flow}) => {
|
||||
let method;
|
||||
if(flow.type === "http") {
|
||||
if(flow.websocket) {
|
||||
method = flow.client_conn.tls_established ? "WSS" : "WS";
|
||||
} else {
|
||||
method = flow.request.method;
|
||||
}
|
||||
} else {
|
||||
method = flow.type.toUpperCase();
|
||||
}
|
||||
return (
|
||||
<td className="col-method">{flow.type === "http" ? flow.request.method : flow.type.toUpperCase()}</td>
|
||||
<td className="col-method">{method}</td>
|
||||
)
|
||||
};
|
||||
method.headerName = 'Method'
|
||||
|
Loading…
Reference in New Issue
Block a user