fix: update socket connection path to use /api prefix for Socket.IO
This commit is contained in:
@@ -36,6 +36,7 @@ export const SocketProvider: React.FC<SocketProviderProps> = ({ 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
|
||||
|
||||
Reference in New Issue
Block a user