fix: add ws handshake context

This commit is contained in:
Peter Steinberger
2026-01-12 08:30:08 +00:00
parent 3ab9d99eed
commit 4d075a703e

View File

@@ -1387,7 +1387,7 @@ export async function startGatewayServer(
}; };
if (!client) { if (!client) {
logWsControl.warn( logWsControl.warn(
`closed before connect conn=${connId} remote=${remoteAddr ?? "?"} code=${code ?? "n/a"} reason=${reason?.toString() || "n/a"}`, `closed before connect conn=${connId} remote=${remoteAddr ?? "?"} fwd=${forwardedFor ?? "n/a"} origin=${requestOrigin ?? "n/a"} host=${requestHost ?? "n/a"} code=${code ?? "n/a"} reason=${reason?.toString() || "n/a"}`,
closeContext, closeContext,
); );
} }
@@ -1497,7 +1497,7 @@ export async function startGatewayServer(
}); });
} else { } else {
logWsControl.warn( logWsControl.warn(
`invalid handshake conn=${connId} remote=${remoteAddr ?? "?"}`, `invalid handshake conn=${connId} remote=${remoteAddr ?? "?"} fwd=${forwardedFor ?? "n/a"} origin=${requestOrigin ?? "n/a"} host=${requestHost ?? "n/a"}`,
); );
} }
const closeReason = truncateCloseReason( const closeReason = truncateCloseReason(