[web] restrict external heartbeat/server ping to websocket transport (#23830)

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: c03a78e2c05cd380b705bd14652060980682cb39
This commit is contained in:
Jakob Ackermann
2025-02-25 09:05:02 +00:00
committed by Copybot
co-authored by Alf Eaton
parent 4d857b7937
commit 8138c76c1d
2 changed files with 11 additions and 5 deletions
+4 -1
View File
@@ -175,7 +175,10 @@ module.exports = Router = {
return
}
const useServerPing =
!!client.handshake?.query?.esh && !!client.handshake?.query?.ssp
!!client.handshake?.query?.esh &&
!!client.handshake?.query?.ssp &&
// No server ping with long-polling transports.
client.transport === 'websocket'
const isDebugging = !!client.handshake?.query?.debugging
const projectId = client.handshake?.query?.projectId