web: display WS/WSS as method

This commit is contained in:
Maximilian Hils 2022-03-19 14:37:33 +01:00
parent 628d6201ae
commit a0e04a7833
3 changed files with 13 additions and 3 deletions

View File

@ -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>

View File

@ -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"

View File

@ -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'