Merge pull request #531 from Tria-plc/freight/feat/chat-app

chore: enable polling to the socket.io on the passenger clients
This commit is contained in:
Nathnael Wondisha
2026-07-08 09:52:27 +03:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -37,7 +37,9 @@ export function useSupportSocket(
`${SOCKET_ORIGIN}/${Passenger.PASSENGER_SUPPORT_WS_NAMESPACE}`,
{
auth: { token },
transports: ['websocket'],
// Prefer WebSocket, fall back to HTTP long-polling if the proxy blocks
// the upgrade (polling rides normal HTTPS, already CSP-allowed).
transports: ['websocket', 'polling'],
withCredentials: true,
},
);

View File

@@ -26,7 +26,9 @@ export function useSupportSocket(enabled: boolean) {
`${SOCKET_ORIGIN}/${Passenger.PASSENGER_SUPPORT_WS_NAMESPACE}`,
{
auth: { guestId: getDeviceId() },
transports: ['websocket'],
// Prefer WebSocket, fall back to HTTP long-polling if the proxy blocks
// the upgrade (polling rides normal HTTPS, already CSP-allowed).
transports: ['websocket', 'polling'],
withCredentials: true,
},
);