Improve WebSocket probe to support non-redirect behaviours of corporate proxies
Author: nirben82Created May 7, 2026Updated May 7, 2026
Problem
The current WebSocket probe in #1391 detects session expiry by checking for opaqueredirect. This works for proxies that return a 302 Redirect on handshake.
However, other proxies might:
- Return
200 OKbut serve a login page HTML. - Return
401 Unauthorizedor403 Forbidden. In these cases, the current check fails to detect that re-auth is needed.
Proposed Solution
Observe additional proxy behaviours (such as returning HTML on 200, or 401/403 status codes) and update the probeConnection logic in channel.ts to handle them accordingly.
Source: mesop-dev/mesop