fix: update socket connection path to use /api prefix for Socket.IO
Some checks failed
Frontend CI / lint (push) Failing after 5m10s
Frontend CI / build (push) Has been skipped

This commit is contained in:
JSC
2025-07-08 22:36:06 +02:00
parent 1f997daf24
commit f7dc3a4040

View File

@@ -36,6 +36,7 @@ export const SocketProvider: React.FC<SocketProviderProps> = ({ children }) => {
useEffect(() => { useEffect(() => {
// Create socket connection // Create socket connection
const newSocket = io("http://localhost:5000", { const newSocket = io("http://localhost:5000", {
path: "/api/socket.io/", // Use /api prefix for Socket.IO
withCredentials: true, // Include cookies for authentication withCredentials: true, // Include cookies for authentication
autoConnect: false, // Don't connect automatically autoConnect: false, // Don't connect automatically
transports: ["polling"], // Use polling only to avoid WebSocket issues transports: ["polling"], // Use polling only to avoid WebSocket issues