mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +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
|
<td
|
||||||
class="col-method"
|
class="col-method"
|
||||||
>
|
>
|
||||||
GET
|
WSS
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -34,7 +34,7 @@ exports[`FlowRow 1`] = `
|
|||||||
<td
|
<td
|
||||||
class="col-method"
|
class="col-method"
|
||||||
>
|
>
|
||||||
GET
|
WSS
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
class="col-status"
|
class="col-status"
|
||||||
|
@ -107,8 +107,18 @@ path.headerName = 'Path'
|
|||||||
path.sortKey = flow => mainPath(flow)
|
path.sortKey = flow => mainPath(flow)
|
||||||
|
|
||||||
export const method: FlowColumn = ({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 (
|
return (
|
||||||
<td className="col-method">{flow.type === "http" ? flow.request.method : flow.type.toUpperCase()}</td>
|
<td className="col-method">{method}</td>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
method.headerName = 'Method'
|
method.headerName = 'Method'
|
||||||
|
Loading…
Reference in New Issue
Block a user