Skip to content

Commit

Permalink
fix: add credentials to socket client (#112)
Browse files Browse the repository at this point in the history
fix: add credentials to soket client
  • Loading branch information
romansharapov19 authored Aug 3, 2023
1 parent 50620e7 commit be0306f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/web-ui/app/state/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { atom } from 'recoil';
import io, { Socket } from 'socket.io-client';

// @ts-ignore
const socket = io(process.env.NEXT_PUBLIC_SOCKET_URL);
const socket = io(process.env.NEXT_PUBLIC_SOCKET_URL, {
withCredentials: true,
transports: ['websocket'],
});

export const socketState = atom<Socket>({
key: 'Socket',
Expand Down

0 comments on commit be0306f

Please sign in to comment.