From 301df4fd3abc33565b6fe8fa401afa9286a9f03c Mon Sep 17 00:00:00 2001 From: Rahul Kumar Bharti Date: Thu, 10 Oct 2024 23:25:47 +0530 Subject: [PATCH] Update socket.js --- js/socket.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/socket.js b/js/socket.js index 0baf59d..336db60 100644 --- a/js/socket.js +++ b/js/socket.js @@ -1,5 +1,8 @@ -const socket = io("https://heystranger-backend.azurewebsites.net"); +const socket = io('https://heystranger-backend.azurewebsites.net', { + withCredentials: true, // Make sure credentials (cookies) are sent with the request + transports: ['websocket', 'polling'] +}); // Socket Listeners and Caller const getMatch = (userData) => socket.emit("match", userData); @@ -38,4 +41,4 @@ export { hangUp, onHangup, removerListeners -}; \ No newline at end of file +};