Skip to content

Commit

Permalink
adfs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bit-Barron committed Nov 2, 2024
1 parent ec1a8bb commit d34248e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d34248e

Please sign in to comment.