fix(websocket): configure Socket.IO path for nginx proxy

This commit is contained in:
hailin 2026-01-10 01:12:58 -08:00
parent ab9f479f81
commit d073bd5a9d
2 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ interface SendMessagePayload {
credentials: true,
},
namespace: '/ws/conversation',
path: '/ws/conversation/socket.io',
})
export class ConversationGateway
implements OnGatewayConnection, OnGatewayDisconnect

View File

@ -21,6 +21,7 @@ export function useChat() {
if (!userId) return;
const socket = io('/ws/conversation', {
path: '/ws/conversation/socket.io',
query: { userId },
transports: ['websocket'],
});