From d34248e3c7e62750ae37ab010b82390431e11a1e Mon Sep 17 00:00:00 2001 From: Bit-Barron Date: Sat, 2 Nov 2024 03:07:34 +0100 Subject: [PATCH] adfs --- src/lib/socket.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/socket.ts b/src/lib/socket.ts index 654c624..83cb13f 100644 --- a/src/lib/socket.ts +++ b/src/lib/socket.ts @@ -3,9 +3,8 @@ import { io, type Socket } from 'socket.io-client'; export const initSocket = (userId: string): Socket | null => { if (browser) { - const socketUrl = `${window.location.protocol}//${window.location.hostname}:3001`; - - const socket = io(socketUrl, { + // Kein expliziter Port - nutze den gleichen Port wie die App + const socket = io(window.location.origin, { auth: { userId }, reconnection: true, reconnectionDelay: 1000,