diff --git a/frontend/.env.server b/frontend/.env.server index 2f08c81..ced11bc 100644 --- a/frontend/.env.server +++ b/frontend/.env.server @@ -2,4 +2,5 @@ VITE_API_BASE_URL=https://www.your-part.de VITE_TINYMCE_API_KEY=xjqnfymt2wd5q95onkkwgblzexams6l6naqjs01x72ftzryg VITE_DAEMON_SOCKET=wss://www.your-part.de:4551 VITE_CHAT_WS_URL=wss://www.your-part.de:1235 +VITE_SOCKET_IO_URL=https://www.your-part.de:4443 diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index eac988f..6d8a353 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -85,10 +85,11 @@ const store = createStore({ if (currentSocket) { currentSocket.disconnect(); } - console.log('🔌 Initializing Socket.io connection to:', import.meta.env.VITE_API_BASE_URL); - const socket = io(import.meta.env.VITE_API_BASE_URL, { + const socketIoUrl = import.meta.env.VITE_SOCKET_IO_URL || import.meta.env.VITE_API_BASE_URL; + console.log('🔌 Initializing Socket.io connection to:', socketIoUrl); + const socket = io(socketIoUrl, { secure: true, - transports: ['polling'] + transports: ['websocket', 'polling'] }); socket.on('connect', () => {