From f7dc3a40405c4cde4dbb9ddcd6da2dad61cb2883 Mon Sep 17 00:00:00 2001 From: JSC Date: Tue, 8 Jul 2025 22:36:06 +0200 Subject: [PATCH] fix: update socket connection path to use /api prefix for Socket.IO --- src/contexts/SocketContext.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/contexts/SocketContext.tsx b/src/contexts/SocketContext.tsx index 7240f19..36d2d14 100644 --- a/src/contexts/SocketContext.tsx +++ b/src/contexts/SocketContext.tsx @@ -36,6 +36,7 @@ export const SocketProvider: React.FC = ({ children }) => { useEffect(() => { // Create socket connection const newSocket = io("http://localhost:5000", { + path: "/api/socket.io/", // Use /api prefix for Socket.IO withCredentials: true, // Include cookies for authentication autoConnect: false, // Don't connect automatically transports: ["polling"], // Use polling only to avoid WebSocket issues