fix(websocket): configure Socket.IO path for nginx proxy
This commit is contained in:
parent
ab9f479f81
commit
d073bd5a9d
|
|
@ -21,6 +21,7 @@ interface SendMessagePayload {
|
||||||
credentials: true,
|
credentials: true,
|
||||||
},
|
},
|
||||||
namespace: '/ws/conversation',
|
namespace: '/ws/conversation',
|
||||||
|
path: '/ws/conversation/socket.io',
|
||||||
})
|
})
|
||||||
export class ConversationGateway
|
export class ConversationGateway
|
||||||
implements OnGatewayConnection, OnGatewayDisconnect
|
implements OnGatewayConnection, OnGatewayDisconnect
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ export function useChat() {
|
||||||
if (!userId) return;
|
if (!userId) return;
|
||||||
|
|
||||||
const socket = io('/ws/conversation', {
|
const socket = io('/ws/conversation', {
|
||||||
|
path: '/ws/conversation/socket.io',
|
||||||
query: { userId },
|
query: { userId },
|
||||||
transports: ['websocket'],
|
transports: ['websocket'],
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue